Merge remote-tracking branch 'origin/dev' into test

This commit is contained in:
fan 2019-09-11 13:20:30 +08:00
commit 41b70bc477
85 changed files with 1011 additions and 1680 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View File

@ -0,0 +1,22 @@
export default {
testStatistics: 'Test statistics',
simulationStatistics: 'simulationStatistics',
comprehensiveExerciseCloudPlatform: 'Comprehensive exercise cloud platform',
driverSimulatedDrivingSystem: 'Driver simulated driving system',
ATSLineAdjustmentWorkstation: 'ATS line adjustment workstation',
ATSLocalWorkstation: 'ATS local workstation',
courseStatistics: 'Course Statistics',
signalTraining: 'Signal Training',
turnoutTraining: 'Turnout Training',
sectionTraining: 'Section Training',
stationTraining: 'Station Training',
permissions: 'Permissions (individual)',
largeScreenSystemPermissions: 'Large screen system permissions',
courseAuthority: 'Course authority',
examinationAuthority: 'Examination authority',
simulationPermission: 'Simulation Permission',
residualPermissionDistributionMap: 'Residual permission distribution map',
totalPermissions: 'total permissions',
noMapLineDataYetAvailable: 'No map line data yet available',
individual: 'individual'
};

View File

@ -62,6 +62,7 @@ export default {
obtainChapterDataFailed: 'Failed to obtain chapter data',
obtainCourseDetailsFailed: 'Failed to obtain course details',
obtainCourseInformationFailed: 'Failed to obtain course information',
obtainStepDataFailed: 'Failed to obtain step data'
obtainStepDataFailed: 'Failed to obtain step data',
submitExamFailed: 'Automatic submission of test results failed',
getTestInformationFailed: 'Failed to get test information'
};

View File

@ -1,16 +1,39 @@
export default {
testSystem: '城市轨道交通考试系统',
testSystemDescription: ' 该系统具有自定义考试规则、自动生成考卷、学员成绩统计、数据曲线分析及题库管理等功能,从实战操作、业务流程、故障模拟及考试规则等多角度出发,力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统',
examResultsDetails: '考试结果详情',
testQuestionsName: '试题名称',
testScores: '考试得分',
points: '分',
whetherThrough: '是否通过',
didNotCalculate: '未计算',
pass: '通过',
notPass: '未通过',
examTime: '考试用时',
trainingName: '实训名称',
trainingScore: '实训得分',
returnToExamList: '返回考试列表'
testSystem: 'Urban rail transit examination system',
testSystemDescription: 'The system has the functions of self-defined examination rules, automatic generation of examination papers, statistics of students\' scores, data curve analysis and question bank management, etc. From the perspectives of practical operation, business process, fault simulation and examination rules, it strives to build the online interactive practical operation examination system of urban rail transit that best meets users\' needs',
examResultsDetails: 'Details of examination results',
testQuestionsName: 'Item name',
testScores: 'Test scores',
points: 'Point',
whetherThrough: 'Whether through',
didNotCalculate: 'Did not calculate',
pass: 'pass',
notPass: 'Not pass',
examTime: 'Exam time',
trainingName: 'Training name',
trainingScore: 'Training score',
returnToExamList: 'Return to the exam list',
totalScore: 'Total score',
itemList: 'Item list',
courseName: 'Course name',
permissionsDetails: 'Permissions for details',
buy: 'buy',
distributePermission: 'Permission distribution (examination)',
viewCoursePapers: 'View course papers',
examStartTime: 'Exam start time',
theExamIsReadyAnyTime: 'The exam is ready any time',
testExplanation: 'Test Explanation',
examTimeAvailable: 'Exam time available',
fullMarksInTheExam: 'Full marks in the exam',
passMarkTheExam: 'Pass mark the exam',
examinationRules: 'Examination rules',
trainingType: 'Training type',
numberOfQuestions: 'Number of questions',
score: 'Score',
startTheExam: 'Start the exam',
examinationTiming: 'Examination timing',
maximumTimeToCompleteThisQuestion: 'Maximum time to complete this question',
theBestTimeToCompleteTheQuestion: 'The best time to complete the question',
trainingNotes: 'Training notes',
giveUpTheExam: 'Give up the exam'
};

View File

@ -104,7 +104,10 @@ export default {
updateTime: 'Update time:',
line: 'Line:',
permissionList: 'Permissions list:',
remove: 'remove',
append: 'append',
release: 'release'
remove: 'Remove',
append: 'Append',
release: 'Release',
temporarilyNoData: 'Temporarily no data',
second: 'Second',
amount: 'Amount'
};

View File

@ -17,6 +17,7 @@ import planMonitor from './planMonitor';
import screenMonitor from './screenMonitor';
import demonstration from './demonstration';
import exam from './exam';
import dashboard from './dashboard';
export default {
...enLocale,
@ -37,5 +38,6 @@ export default {
planMonitor,
screenMonitor,
demonstration,
exam
exam,
dashboard
};

View File

@ -84,5 +84,7 @@ export default {
sourcesOfInformation: 'Sources of information',
distributePermission: 'Distribute permission',
orderCreation: 'Order creation',
chooseGoods: 'Choose goods'
chooseGoods: 'Choose goods',
permissionName: 'Permission Name',
receivingPermission: 'Receiving permission'
};

View File

@ -26,6 +26,7 @@ export default {
addPermissionPackageRule: 'Add authority packaging rules',
editPermissionPackageRule: 'edit authority packaging rule',
restPermissionMaxNumber: '(maximum number of remaining permissions: {0})',
pleaseSelectTransferPermission: 'Select transfer permissions'
pleaseSelectTransferPermission: 'Select transfer permissions',
permissionName: 'Permission Name'
};

View File

@ -53,6 +53,7 @@ export default {
dataDictionary: 'Data dictionary',
dataDictionaryDetails: 'Data dictionary details',
userManage: 'user management',
cacheManage: 'cache management',
userTrainingManage: 'User training management',
userExamManage: 'User examination management',
userSimulationManage: 'User simulation management',

View File

@ -238,5 +238,14 @@ export default {
selectTrainingType: 'Please select training type',
selectOneTrainingType: 'Only one training type can be selected',
enterProductType: 'Please enter product type',
selectAssociatedStation: 'Please select the associated station'
selectAssociatedStation: 'Please select the associated station',
enterScale: 'Please enter the zoom ratio',
enterXOffset: 'Please enter X offset',
enterYOffset: 'Please enter Y offset',
pleaseSelectButtonType: 'Please select the button type',
pleaseSelectButtonContent: 'Please enter the content',
endTimeRules: 'The end time must be greater than the start time.',
selectCourses: 'Please select courses',
selectTheMapRoute: 'Please select the map route.'
};

View File

@ -1,22 +1,102 @@
export default {
scriptTitle: 'Task Recording',
saveMaplocation: 'Update Location',
saveBackground: 'Save Background',
saveData: 'Save Data',
roleManage: 'Role Manage',
targetCondition: 'Task Target',
taskScript: 'Task Script',
roleName: 'Role Name',
roleType: 'Role Type',
deviceCode: 'Device Code',
roleList: 'Role List',
operation: 'Operation',
roleAdd: 'Add',
delete: 'Delete',
behaviorOperate: 'Behavior Operate',
conditionTitle: 'Target condition',
deviceType: 'Device Type',
deviceCondition: 'Device Condition',
paramDeviceType: 'Param DeviceType',
paramDeviceCode: 'Param DeviceCode'
mapList: 'Map List',
createScript: 'Create Script',
scriptName: 'Script Name',
addScript: 'Add Script',
map: 'Map',
scriptDescription: 'Script Description',
submit: 'submit',
scriptNameRule: 'Please input script name',
scriptDescriptionRule: 'Please input script description',
createScriptSuccess: 'Create script success',
createScriptFail: 'Create script failure',
scriptDetail: 'Script Detail',
scriptRecord: 'Record',
scriptModify: 'Modify',
scriptDelete: 'Delete',
getScriptFail: 'Get script information failure',
createSimulationFail: 'Create simulation failure',
modifyScriptSuccess: 'Modify script success',
modifyScriptFail: 'Modify script failure',
deleteScriptTip: 'This action will delete this script, whether to continue?',
operateTip: 'Prompt',
confirmButtonText: 'Submit',
cancelButtonText: 'Cancle',
deleteScriptSucess: 'delete script sucess',
deleteScriptFail: 'delete script failure',
scriptRecordTitle: 'Script Record',
drivingPause: 'Pause',
recoverAndExecute: 'Recover And Execute',
resetScript: 'Reset Script',
pauseFail: 'Pause failure',
recoverFail: 'Recover failure',
saveBackgroundSuceess: 'Save background suceess',
updateLocationFail: 'update location failure',
saveBackgroundFail: 'Save background failure',
saveDataSucess: 'Save data sucess',
saveDataFail: 'Save data failure',
clearDataTip: 'This action will clear the saved script data, whether to continue?',
resetDataSuccess: 'Reset script success',
resetDataFail: 'Reset script failure',
allRoles: 'All Roles',
actors: 'Actors',
roleSexMale: 'Male',
roleSexFemale: 'Female',
selectScriptActorSuccess: 'Select script actor success',
selectScriptActorFail: 'Select script actor failure',
cancleScriptActorSuccess: 'Cancle script actor success',
cancleScriptActorFail: 'Cancle script actor failure',
modifyScriptActorSexSuccess: 'Modify script actor sex success',
modifyScriptActorSexFail: 'Modify script actor sex failure',
addConversition: 'Add Conversition',
narrator: 'Narrator',
narratorRules: 'Please select narrator',
receiver: 'Receiver',
receiverRules: 'Please select receiver',
conversitionContent: 'Content',
addCommand: 'Add Command',
executor: 'Executor',
executorRules: 'Please select executor',
executeCommand: 'Command',
executeCommandRules: 'Please select execute command',
startStation: 'Start Station',
startStationRules: 'Please select start station ',
endStation: 'End Station',
endStationRules: 'Please select end station',
addCommandButton: 'Add Command',
addConversitionButton: 'Add Conversition',
conversitionContentRules: 'Please input content',
addCommandSucess: 'Add command sucess',
addCommandFail: 'Add command failure',
addConversitionSuccess: 'Add conversition success',
addConversitionFail: 'Add conversition failure',
modifyConversitionSuccess: 'Modify conversition success',
modifyConversitionFail: 'Modify conversition failure',
modifyConversition: 'Modify Conversition',
modifyConversitionButton: 'modify',
drivingByPlan: 'Driving By Plan',
scriptBack: 'Back'
// roleManage: 'Role Manage',
// targetCondition: 'Task Target',
// taskScript: 'Task Script',
// roleName: 'Role Name',
// roleType: 'Role Type',
// deviceCode: 'Device Code',
// roleList: 'Role List',
// operation: 'Operation',
// roleAdd: 'Add',
// delete: 'Delete',
// behaviorOperate: 'Behavior Operate',
// conditionTitle: 'Target condition',
// deviceType: 'Device Type',
// deviceCondition: 'Device Condition',
// paramDeviceType: 'Param DeviceType',
// paramDeviceCode: 'Param DeviceCode'
};

View File

@ -125,6 +125,9 @@ export default {
updateTrainingSuccessfully: 'Update training successfully!',
updateTrainingFailed: 'Failed to update training',
savedStepDataSuccessfully: 'Saved step data successfully',
savedStepDataFailed: 'Failed to save step data'
savedStepDataFailed: 'Failed to save step data',
noCourseAuthority: 'No examination permission for this course, please go to purchase!',
notWithinTheScopeOfTheExamination: 'Not within the scope of the examination',
giveUpTheExamTip: 'This operation will give up the examination. Will it continue?',
theNumberOfPermissionsAvailableIsZero: 'The number of permissions available is 0'
};

View File

@ -0,0 +1,23 @@
export default {
testStatistics: '考试统计',
simulationStatistics: '仿真统计',
comprehensiveExerciseCloudPlatform: '综合演练云平台',
driverSimulatedDrivingSystem: '司机模拟驾驶系统',
ATSLineAdjustmentWorkstation: 'ATS行调工作站',
ATSLocalWorkstation: 'ATS现地工作站',
courseStatistics: '课程统计',
controlRightsTraining: '控制权实训',
signalTraining: '信号机实训',
turnoutTraining: '道岔实训',
sectionTraining: '区段实训',
stationTraining: '车站培训',
permissions: '权限(个)',
largeScreenSystemPermissions: '大屏系统权限',
courseAuthority: '课程权限',
examinationAuthority: '考试权限',
simulationPermission: '仿真权限',
residualPermissionDistributionMap: '剩余权限分布图',
totalPermissions: '权限总计',
noMapLineDataYetAvailable: '暂无地图线路数据',
individual: '个'
};

View File

@ -62,5 +62,7 @@ export default {
obtainChapterDataFailed: '获取章节数据失败',
obtainCourseDetailsFailed: '获取课程详情失败',
obtainCourseInformationFailed: '获取课程信息失败',
obtainStepDataFailed: '获取步骤数据失败'
obtainStepDataFailed: '获取步骤数据失败',
submitExamFailed: '自动提交考试结果失败',
getTestInformationFailed: '获取试题息失败'
};

View File

@ -12,5 +12,29 @@ export default {
examTime: '考试用时',
trainingName: '实训名称',
trainingScore: '实训得分',
returnToExamList: '返回考试列表'
returnToExamList: '返回考试列表',
totalScore: '总分',
itemList: '试题列表',
courseName: '课程名称',
permissionsDetails: '权限详情',
buy: '购买',
distributePermission: '权限分发(考试)',
viewCoursePapers: '查看课程试卷',
nameOfTestPaper: '试卷名称',
examStartTime: '考试时间',
theExamIsReadyAnyTime: '随时都可以考试',
testExplanation: '考试说明',
examTimeAvailable: '考试时长',
fullMarksInTheExam: '考试满分',
passMarkTheExam: '考试及格分',
examinationRules: '考试规则',
trainingType: '实训类型',
numberOfQuestions: '题数',
score: '分值',
startTheExam: '开始考试',
examinationTiming: '考试计时',
maximumTimeToCompleteThisQuestion: '完成本题最大用时',
theBestTimeToCompleteTheQuestion: '完成本题最佳用时',
trainingNotes: '实训说明',
giveUpTheExam: '放弃考试'
};

View File

@ -145,5 +145,8 @@ export default {
permissionList: '权限列表:',
remove: '移除',
append: '添 加',
release: '发布'
release: '发布',
temporarilyNoData: '暂无数据',
second: '秒',
amount: '总数量'
};

View File

@ -17,6 +17,7 @@ import planMonitor from './planMonitor';
import screenMonitor from './screenMonitor';
import demonstration from './demonstration';
import exam from './exam';
import dashboard from './dashboard';
export default {
...cnLocale,
@ -37,5 +38,6 @@ export default {
planMonitor,
screenMonitor,
demonstration,
exam
exam,
dashboard
};

View File

@ -84,5 +84,7 @@ export default {
distributePermission: '权限分发',
orderCreation: '订单创建',
select: '选择',
chooseGoods: '选择商品'
chooseGoods: '选择商品',
permissionName: '权限名称',
receivingPermission: '领取权限'
};

View File

@ -26,6 +26,7 @@ export default {
addPermissionPackageRule: '增加权限打包规则',
editPermissionPackageRule: '编辑权限打包规则',
restPermissionMaxNumber: '(剩余最大权限个数:{0}',
pleaseSelectTransferPermission: '选择转赠权限'
pleaseSelectTransferPermission: '选择转赠权限',
permissionName: '权限名称'
};

View File

@ -249,12 +249,13 @@ export default {
selectOneTrainingType: '只能选择一个实训类型',
enterProductType: '请输入产品类型',
selectAssociatedStation: '请选择关联的车站',
enterScale: '请输入缩放比例',
enterXOffset: '请输入X偏移',
enterYOffset: '请输入Y偏移',
pleaseSelectButtonType: '请选择按钮类型',
pleaseSelectButtonContent: '请输入内容'
pleaseSelectButtonContent: '请输入内容',
endTimeRules: '结束时间必须大于开始时间',
selectCourses: '请选择课程',
selectTheMapRoute: '请选择地图线路'
};

View File

@ -1,11 +1,88 @@
export default {
scriptTitle: '剧本录制',
// saveMaplocation: '更新定位',
saveBackground: '保存背景',
saveData: '保存数据',
mapList: '地图列表',
createScript: '创建剧本',
scriptName: '剧本名称',
addScript: '添加剧本',
map: '所属地图',
scriptDescription: '剧本描述',
submit: '确定',
scriptNameRule: '请输入剧本名称',
scriptDescriptionRule: '请输入剧本描述',
createScriptSuccess: '创建剧本成功',
createScriptFail: '创建剧本失败',
scriptDetail: '剧本详情',
scriptRecord: '编制',
scriptModify: '修改',
scriptDelete: '删除',
getScriptFail: '获取剧本信息失败',
createSimulationFail: '创建仿真失败',
modifyScriptSuccess: '修改剧本成功',
modifyScriptFail: '修改剧本失败',
deleteScriptTip: '此操作将删除此剧本, 是否继续?',
operateTip: '提示',
confirmButtonText: '确定',
cancelButtonText: '取消',
deleteScriptSucess: '删除成功',
deleteScriptFail: '删除失败',
scriptRecordTitle: '剧本编制',
drivingPause: '暂停',
recoverAndExecute: '恢复并执行',
resetScript: '重置剧本',
pauseFail: '暂停失败',
recoverFail: '恢复失败',
saveBackgroundSuceess: '保存背景成功',
updateLocationFail: '更新定位失败',
saveBackgroundFail: '保存背景失败',
saveDataSucess: '保存数据成功',
saveDataFail: '保存数据失败',
clearDataTip: '此操作将会清除已保存的编制数据, 是否继续?',
resetDataSuccess: '重置剧本成功',
resetDataFail: '重置剧本失败',
allRoles: '所有角色',
actors: '演员角色',
roleSexMale: '男',
roleSexFemale: '女',
selectScriptActorSuccess: '选择剧本角色成功',
selectScriptActorFail: '选择剧本角色失败',
cancleScriptActorSuccess: '取消剧本角色成功',
cancleScriptActorFail: '取消剧本角色失败',
modifyScriptActorSexSuccess: '修改剧本成员性别成功',
modifyScriptActorSexFail: '修改剧本成员性别失败',
addConversition: '添加对话',
narrator: '讲述者',
narratorRules: '请选择讲述者',
receiver: '接收者',
receiverRules: '请选择接收者',
conversitionContent: '内容',
addCommand: '添加指令',
executor: '执行者',
executorRules: '请选择执行者',
executeCommand: '执行指令',
executeCommandRules: '请选择执行指令',
startStation: '起始站台',
startStationRules: '请选择起始站台',
endStation: '终点站台',
endStationRules: '请选择终点站台',
addCommandButton: '添加指令',
addConversitionButton: '添加对话',
conversitionContentRules: '请输入内容',
addCommandSucess: '添加指令成功',
addCommandFail: '添加指令失败',
addConversitionSuccess: '添加对话成功',
addConversitionFail: '添加对话失败',
modifyConversitionSuccess: '修改对话成功',
modifyConversitionFail: '修改对话失败',
modifyConversition: '修改对话',
modifyConversitionButton: '修改',
drivingByPlan: '按计划行车',
scriptBack: '返回'
// roleManage: '角色管理',
// targetCondition: '任务目标',

View File

@ -129,5 +129,9 @@ export default {
updateTrainingSuccessfully: '更新实训成功!',
updateTrainingFailed: '更新实训失败',
savedStepDataSuccessfully: '保存步骤数据成功',
savedStepDataFailed: '保存步骤数据失败'
savedStepDataFailed: '保存步骤数据失败',
noCourseAuthority: '无此课程的考试权限,请前往购买!',
notWithinTheScopeOfTheExamination: '不在考试范围之内',
giveUpTheExamTip: '此操作将放弃本次考试, 是否继续?',
theNumberOfPermissionsAvailableIsZero: '可用的权限数量为0'
};

View File

@ -30,13 +30,6 @@ deviceRender[deviceType.Arrow] = {
z: 2
};
/** RotatingButton渲染配置*/
deviceRender[deviceType.RotatingButton] = {
_type: deviceType.RotatingButton,
zlevel: 1,
z: 3
};
/** TipBox渲染配置*/
deviceRender[deviceType.TipBox] = {
_type: deviceType.TipBox,

View File

@ -2,7 +2,6 @@ const deviceType = {
IbpText: 'IbpText',
SquareButton: 'SquareButton',
Arrow: 'Arrow',
RotatingButton: 'RotatingButton',
TipBox: 'TipBox',
Background: 'Background',
CircularLamp: 'CircularLamp',

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,6 @@ import localStore from 'storejs';
import Options from './options';
import MouseController from './mouseController';
import Painter from './painter';
import deviceState from '../jmap/constant/deviceState';
import deviceType from './constant/deviceType';
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
import { updateIbpData } from './utils/parser';
@ -17,10 +16,7 @@ class IbpPan {
this.methods = opts.methods;
// 鼠标事件
this.events = { __Pan: 'pan', __Zoom: 'zoom', Selected: 'selected', Contextmenu: 'contextmenu', DataZoom: 'dataZoom'};
// 皮肤参数
// this.skinCode = '';
this.events = { __Pan: 'pan', Contextmenu: 'contextmenu'};
// 设备数据
this.ibpDevice = {};
@ -28,9 +24,6 @@ class IbpPan {
// 展示的画布大小
this.canvasSize = {};
// 默认状态
this.defaultStateDict = this.loadDefaultState();
this.initIbpPage(opts);
}
initIbpPage(opts) {
@ -38,7 +31,7 @@ class IbpPan {
const height = opts.config.height;
this.isAllowDragging=false;
this.$ibpZr = zrender.init(opts.dom, Object.assign({ renderer, devicePixelRatio, width, height }, opts.config));
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {})); // 缩放
this.$mouseController = new MouseController(this);
this.$mouseController.enable();
@ -50,21 +43,8 @@ class IbpPan {
this.optionsHandler = this.setOptions.bind(this);
this.$mouseController.on(this.events.__Pan, this.optionsHandler);
this.$mouseController.on(this.events.__Zoom, this.optionsHandler);
}
loadDefaultState() {
const defaultStateDict = {};
zrUtil.each(Object.keys(deviceState), (type) => {
defaultStateDict[type] = {};
zrUtil.each(Object.keys(deviceState[type] || {}), (state) => {
defaultStateDict[type][state] = deviceState[type][state].Default;
}, this);
}, this);
return defaultStateDict;
}
setMap(config, ibpDevice) {
// 保存平移缩放数据
if (config.config) {
@ -84,7 +64,7 @@ class IbpPan {
height: config.background.height
};
// 解析地图数据
// 地图数据
this.ibpDevice = ibpDevice;
// 数据加载完成 回调
@ -235,13 +215,6 @@ class IbpPan {
return this.ibpDevice[code];
}
getShapeTipPoint(opts) {
const device = this.ibpDevice[opts.code];
if (device) {
return this.$painter.getShapeTipPoint(device.instance, opts);
}
}
resize(opt) {
this.$ibpZr.resize(opt);
this.$painter.updateZrSize(opt);

View File

@ -34,14 +34,12 @@ class MouseController extends Eventful {
initHandler(zr) {
if (zr) {
zr.on('click', this.click, this);
zr.on('contextmenu', this.contextmenu, this);
zr.on('mousemove', this.moveEvent, this);
this.enable = function (opts) {
opts = opts || {};
this._moveOnMouseMove = opts.moveOnMouseMove || true;
this._zoomOnMouseWheel = opts.zoomOnMouseWheel || false;
this._preventDefaultMouseMove = opts.preventDefaultMouseMove || true;
this.disable();
@ -52,30 +50,20 @@ class MouseController extends Eventful {
zr.on('touchstart', this.mousedown, this);
zr.on('touchmove', this.mousemove, this);
zr.on('touchend', this.mouseup, this);
zr.on('mousewheel', this.mousewheel, this);
};
this.disable = function () {
zr.off('mousedown', this.mousedown);
zr.off('mousemove', this.mousemove);
zr.off('mouseup', this.mouseup);
zr.off('touchstart', this.mousedown);
zr.off('touchmove', this.mousemove);
zr.off('touchend', this.mouseup);
zr.off('mousewheel', this.mousewheel);
};
this.dispose = function () {
zr.off('click', this.click);
zr.off('contextmenu', this.contextmenu);
zr.off('mousemove', this.moveEvent);
zr.off('touchstart', this.mousedown);
zr.off('touchmove', this.mousemove);
zr.off('touchend', this.mouseup);
this.disable();
};
@ -134,45 +122,20 @@ class MouseController extends Eventful {
}
mouseup(e) {
console.log('-------', this.eventTarget._type===deviceType.Background);
if (!eventTool.notLeftMouse(e)&&this.isAllowDragging && this.eventTarget) {
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
this.eventTarget.dirty();
this.eventTarget = '';
}
// debugger;
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
// console.log('111-------');
this.eventTarget.setCursor('default');
}
this.eventTarget = '';
this._dragging = false;
}
mousewheel(e) {
const shouldZoom = this._zoomOnMouseWheel;
const wheelDelta = e.wheelDelta;
const originX = e.offsetX;
const originY = e.offsetY;
if (wheelDelta === 0 || !shouldZoom) {
return;
}
if (shouldZoom) {
eventTool.stop(e.event);
let scale = 1;
if (wheelDelta > 0) {
scale = 1;
} else if (wheelDelta < 0) {
scale = -1;
}
this.trigger(this.events.__Zoom, {type: this.events.__Zoom, scale, originX, originY });
}
}
click(e) {
var em = this.checkEvent(e);
this.trigger(this.events.Selected, em);
}
contextmenu(e) {
var em = this.checkEvent(e);
this.trigger(this.events.Contextmenu, em);

View File

@ -117,25 +117,6 @@ class Painter {
}
/**
* 过去坐标提示位置
* @param {*} opts
*/
getShapeTipPoint(instance, opts) {
if (instance) {
var point = instance.getShapeTipPoint(opts);
if (point) {
// 矩阵变换
var transform = this.$transformHandle.transform;
var transPoint = vector.applyTransform([], [point.x, point.y], transform);
return {
x: transPoint[0],
y: transPoint[1]
};
}
}
}
/**
* 初始化电子时钟时间
*/
initClockTime(device, initTime) {

View File

@ -1,6 +1,6 @@
import Group from 'zrender/src/container/Group';
import Image from 'zrender/src/graphic/Image';
import AppendageBoxImage from '@/assets/ibp_images/appendage_box.png';
import Sector from 'zrender/src/graphic/shape/Sector';
import Rect from 'zrender/src/graphic/shape/Rect';
export default class AppendageBox extends Group {
constructor(device) {
@ -18,19 +18,108 @@ export default class AppendageBox extends Group {
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.appendageBox = new Image({
const spaceHeight = (this.model.height-this.model.borderWidth*3)/2;
this.rect1 = new Rect({
zlevel: this.zlevel,
z: this.z,
draggable: false,
style: {
image: AppendageBoxImage,
shape: {
x: 0,
y: 0,
width: this.model.width,
height: this.model.height
width: this.model.width - this.model.borderWidth,
height: this.model.borderWidth
},
style: {
fill: '#34383A'
}
});
this.grouper.add(this.appendageBox);
this.rect2 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: this.model.borderWidth + spaceHeight,
width: this.model.width - this.model.borderWidth,
height: this.model.borderWidth
},
style: {
fill: '#34383A'
}
});
this.rect3 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: 2*this.model.borderWidth + 2*spaceHeight,
width: this.model.width - this.model.borderWidth,
height: this.model.borderWidth
},
style: {
fill: '#34383A'
}
});
this.rect4 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: 0,
width: this.model.borderWidth,
height: this.model.height
},
style: {
fill: '#34383A'
}
});
this.sector1 = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width - this.model.borderWidth,
cy: this.model.borderWidth,
r: this.model.borderWidth,
startAngle: 1.5*Math.PI,
endAngle: 2*Math.PI
},
style: {
fill: '#34383A'
}
});
this.sector2 = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width - this.model.borderWidth,
cy: 2*this.model.borderWidth + spaceHeight,
r: this.model.borderWidth,
startAngle: 1.5*Math.PI,
endAngle: 2*Math.PI
},
style: {
fill: '#34383A'
}
});
this.sector3 = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width - this.model.borderWidth,
cy: 3*this.model.borderWidth + 2*spaceHeight,
r: this.model.borderWidth,
startAngle: 1.5*Math.PI,
endAngle: 2*Math.PI
},
style: {
fill: '#34383A'
}
});
this.grouper.add(this.rect1);
this.grouper.add(this.rect2);
this.grouper.add(this.rect3);
this.grouper.add(this.rect4);
this.grouper.add(this.sector1);
this.grouper.add(this.sector2);
this.grouper.add(this.sector3);
this.add(this.grouper);
}
setModel(dx, dy) {

View File

@ -16,7 +16,8 @@ export default class background extends Group {
create() {
const image = new Image(25, 25);
image.src = ibpBg;
image.onload = (e) => {
image.decode()
.then(() => {
const pattern = new Pattern(image, 'repeat');
this.imageBg = new Rect({
zlevel: this.zlevel,
@ -33,7 +34,9 @@ export default class background extends Group {
}
});
this.add(this.imageBg);
};
}).catch((encodingError) => {
// Do something with the error.
});
}
setModel(dx, dy) {
}

View File

@ -8,7 +8,6 @@ import IbpLine from './ibpLine';
import Button from './button';
import TipBox from './ibpTipBox';
import AppendageBox from './appendageBox';
import RotatingButton from './rotatingButton';
import Elevator from './elevator';
import Key from './key';
import TeleTerminal from './teleTerminal';
@ -25,7 +24,6 @@ ibpShape[deviceType.IbpLine] = IbpLine;
ibpShape[deviceType.SquareButton] = Button;
ibpShape[deviceType.TipBox] = TipBox;
ibpShape[deviceType.AppendageBox] = AppendageBox;
ibpShape[deviceType.RotatingButton] = RotatingButton;
ibpShape[deviceType.Elevator] = Elevator;
ibpShape[deviceType.Key] = Key;
ibpShape[deviceType.TeleTerminal] = TeleTerminal;

View File

@ -28,7 +28,9 @@ export default class ibpTipBox extends Group {
height: this.model.height
},
style: {
fill: this.model.fillColor
fill: this.model.opacity ? 'rgb(0,0,0,0)':this.model.fillColor,
lineWidth: this.model.lineWidth,
stroke: this.model.stroke
}
});
this.grouper.add(this.tipBox);

View File

@ -1,7 +1,10 @@
import Group from 'zrender/src/container/Group';
import Image from 'zrender/src/graphic/Image';
import Line from 'zrender/src/graphic/shape/Line';
import Text from 'zrender/src/graphic/Text';
import keyPic from '@/assets/ibp_images/key.png';
import keyPicOn from '@/assets/ibp_images/key_on.png';
import Keyhole from '@/assets/ibp_images/keyhole.png';
export default class key extends Group {
@ -20,28 +23,113 @@ export default class key extends Group {
id: model.code,
position: [model.point.x, model.point.y]
});
this.keyImage = new Image({
zlevel: this.zlevel,
z: model.z,
draggable: false,
z: model.z+1,
style: {
image: this.getRotateColor(),
x: 0,
y: 0,
width: 314,
height: 932
width: model.width,
height: model.width/314*932
}
});
this.rotatingButton = new Image({
zlevel: this.zlevel,
z: model.z,
style: {
image: Keyhole,
x: 0,
y: 0,
width: model.width,
height: model.width/361*336
}
});
this.ibpLine1 = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.width+2,
y1: model.width/361*336/2,
x2: model.width+12,
y2: model.width/361*336/2
},
style: {
lineWidth: 3,
stroke: '#000'
}
});
this.ibpLine2 = new Line({
zlevel: model.zlevel,
z: model.z,
draggable: false,
shape: {
y1: model.width/361*336+2,
x1: model.width/2,
y2: model.width/361*336+12,
x2: model.width/2
},
style: {
lineWidth: 3,
stroke: '#000'
}
});
this.bottomText = new Text({
zlevel: model.zlevel,
z: model.z,
style: {
x: model.width/2,
y: model.width/361*336+12,
fontWeight: 600,
fontSize: 10,
fontFamily: model.fontFamily,
text: model.bottomText,
textStrokeWidth: 0,
textFill: '#000',
textAlign: 'center',
textPosition: model.textPosition || 'inside',
textLineHeight: 10
}
});
this.topText= new Text({
zlevel: model.zlevel,
z: model.z,
style: {
x: model.width+14,
y: model.width/361*336/2-4,
fontWeight: 600,
fontSize: 10,
fontFamily: model.fontFamily,
text: model.topText,
textStrokeWidth: 0,
textFill: '#000',
textAlign: 'left',
textPosition: model.textPosition || 'inside',
textLineHeight: 10
}
});
this.grouper.add(this.bottomText);
this.grouper.add(this.topText);
this.grouper.add(this.ibpLine1);
this.grouper.add(this.ibpLine2);
this.grouper.add(this.rotatingButton);
this.grouper.add(this.keyImage);
this.add(this.grouper);
this.transformScale();
// this.transformScale();
}
/** 缩放按钮 */
transformScale() {
this.keyImage.origin = [0, 0];
this.keyImage.scale =[this.model.width/314, this.model.width/314];
this.keyImage.dirty();
// this.keyImage.origin = [0, 0];
// this.rotatingButton.origin = [0, 0];
// this.keyImage.scale =[this.model.width/314, this.model.width/314];
// this.rotatingButton.scale =[this.model.width/361, this.model.width/336];
// this.keyImage.dirty();
// this.rotatingButton.dirty();
}
getRotateColor() {
@ -94,4 +182,5 @@ export default class key extends Group {
this.model.point.x+=dx;
this.model.point.y+=dy;
}
}

View File

@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group';
import Image from 'zrender/src/graphic/Image';
import rotateBlack from '@/assets/ibp_images/rotate_black.png';
import rotateRed from '@/assets/ibp_images/rotate_red.png';
import Rect from 'zrender/src/graphic/shape/Rect';
export default class rotateTip extends Group {
@ -21,7 +22,7 @@ export default class rotateTip extends Group {
id: model.code,
position: [model.point.x, model.point.y]
});
this.imageBg = new Image({
this.tip = new Image({
zlevel: this.zlevel,
z: this.z,
draggable: false,
@ -29,20 +30,28 @@ export default class rotateTip extends Group {
image: this.getRotateColor(),
x: 0,
y: 0,
width: 68,
height: 60
width: this.model.width,
height: this.model.width
}
});
this.grouper.add(this.imageBg);
this.add(this.grouper);
this.transformScale();
const tipRect = this.tip.getBoundingRect();
this.tipBg = new Rect({
zlevel: model.zlevel,
z: model.z-1,
draggable: false,
shape: {
x: 0,
y: 0,
width: tipRect.width,
height: tipRect.height
},
style: {
fill: '#CE950F'
}
/** 缩放按钮 */
transformScale() {
this.imageBg.origin = [0, 0];
this.imageBg.scale =[this.model.width/68, this.model.width/68];
this.imageBg.dirty();
});
this.grouper.add(this.tip);
this.grouper.add(this.tipBg);
this.add(this.grouper);
}
getRotateColor() {

View File

@ -1,41 +0,0 @@
import Group from 'zrender/src/container/Group';
import Image from 'zrender/src/graphic/Image';
import Keyhole from '@/assets/ibp_images/keyhole.png';
export default class RotatingButton extends Group {
constructor(device) {
super();
this.model = device.model;
this._type = device.model._type;
this._code = device.model.code;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.create();
}
create() {
const model = this.model;
this.grouper=new Group({
id: model.code,
position: [model.point.x, model.point.y]
});
this.rotatingButton = new Image({
zlevel: this.zlevel,
z: this.z,
draggable: false,
style: {
image: Keyhole,
x: 0,
y: 0,
width: model.width,
height: model.width/361*336
}
});
this.grouper.add(this.rotatingButton);
this.add(this.grouper);
}
setModel(dx, dy) {
this.model.point.x+=dx;
this.model.point.y+=dy;
}
}

View File

@ -59,10 +59,6 @@ export function parser(data) {
ibpDevice[elem.code] = deviceFactory(deviceType.Arrow, elem);
}, this);
zrUtil.each(data.rotatingButtonList || [], elem => {
ibpDevice[elem.code] = deviceFactory(deviceType.RotatingButton, elem);
}, this);
zrUtil.each(data.tipBoxList || [], elem => {
ibpDevice[elem.code] = deviceFactory(deviceType.TipBox, elem);
}, this);
@ -104,7 +100,7 @@ function updateIbpListByDevice(ibp, name, device) {
if (list) {
const index = list.findIndex(elem => { return elem.code == device.code; });
if (index >= 0) {
list[index].dispose ? list.splice(index, 1) : list[index] = device;
device._dispose ? list.splice(index, 1) : list[index] = device;
} else {
list.push(device);
}
@ -130,9 +126,6 @@ export function updateIbpData(device) {
case deviceType.Arrow :
updateIbpListByDevice(ibpData, 'arrowList', device);
break;
case deviceType.RotatingButton :
updateIbpListByDevice(ibpData, 'rotatingButtonList', device);
break;
case deviceType.TipBox :
updateIbpListByDevice(ibpData, 'tipBoxList', device);
break;

View File

@ -263,8 +263,8 @@ export function Jlmap3dSubscribe(jlmap3d) {
trainlisttest.list[code].dispose = false;
trainlisttest.list[code].nowcode = data.body[i].sectionCode;
trainlisttest.list[code].nextcode = data.body[i].nextSectionCode;
const vexlist = [];
const endrotation = null;
let vexlist = [];
let endrotation = null;
if (data.body[i].directionType == '02') { // 向右
let offset = null;
@ -278,13 +278,15 @@ export function Jlmap3dSubscribe(jlmap3d) {
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x+offset*data.body[i].sectionOffsetPercent;
}
const rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].z;
let rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].z;
trainlisttest.list[code].rotation.y = 0;
trainlisttest.list[code].position.x = rotaposx;
trainlisttest.list[code].position.y = 0;
for (let tl=0; tl<6; tl++) {
trainlisttest.list[code].children[tl].position.z = rotaposz;
}
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
@ -319,16 +321,15 @@ export function Jlmap3dSubscribe(jlmap3d) {
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x;
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x+offset*data.body[i].sectionOffsetPercent;
}
const rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].z;
let rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].z;
trainlisttest.list[code].rotation.y = Math.PI;
trainlisttest.list[code].position.x = rotaposx;
trainlisttest.list[code].position.y = 0;
for (let tl=0; tl<6; tl++) {
trainlisttest.list[code].children[tl].position.z = rotaposz;
}
if (data.body[i].groupNumber == '001') {
}
for (let tl=0; tl<6; tl++) {
trainlisttest.list[code].children[tl].position.z = -rotaposz;
}
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x<sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
@ -344,17 +345,25 @@ export function Jlmap3dSubscribe(jlmap3d) {
}
}
}
trainlisttest.list[code].status = '03';
}
trainlisttest.list[code].curve = new THREE.CatmullRomCurve3(vexlist);
trainlisttest.list[code].isStandTrack = sectionlist.sections.datalist[data.body[i].sectionCode].isStandTrack;
trainlisttest.list[code].progress = 0;
trainlisttest.list[code].len = sectionlist.sections.datalist[data.body[i].sectionCode].distance;
trainlisttest.list[code].speed = data.body[i].speed;
if(data.body[i].speed == 0){
trainlisttest.list[code].speeds = data.body[i].speed;
trainlisttest.list[code].speeds = 0;
// trainlisttest.list[code].startmark = 1;
}else{
trainlisttest.list[code].speeds = data.body[i].speed;
trainlisttest.list[code].speeds = parseFloat(data.body[i].speed*10/36/20/trainlisttest.list[code].len);
}
}
} else if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == true) {
trainlisttest.group.remove(trainlisttest.list[code]);
trainlisttest.list[code].progress = null;

View File

@ -340,33 +340,33 @@ stationcanvas.src = "../../static/texture/msgt.png";
function getTextCanvas(text){
let canvas = document.getElementById('canvastexture');
canvas.width = 300;
canvas.height = 374;
canvas.width = 256;
canvas.height = 512;
// canvas.style.width = width;
// canvas.style.height = height;
let ctx = canvas.getContext('2d');
//ctx.fillStyle = '#FFFFFF';
ctx.fillRect(0, 0,300,374);
ctx.fillRect(0, 0,256,512);
ctx.fillStyle = '#FFFFFF';
// ctx.textAlign = 'center';
// ctx.textBaseline = 'middle';
ctx.clearRect(0,0,300,374);
ctx.clearRect(0,0,256,512);
ctx.drawImage(stationcanvas,0,0,300,374);
ctx.drawImage(stationcanvas,0,0,256,512);
ctx.font = "20px Verdana";
ctx.fillText("车站名称: "+text.runPlanName, 40,58);
ctx.fillText("车站名称: "+text.runPlanName, 20,58);
ctx.fillText("漫游", 40,110);
ctx.fillText("信息", 124,110);
ctx.fillText("备忘", 210,110);
ctx.fillText("漫游", 30,100);
ctx.fillText("信息", 114,100);
ctx.fillText("备忘", 190,100);
ctx.fillText("车站序号: "+text.name, 40,155);
ctx.fillText("公里标记:"+text.kmPost,40 ,256*3/4);
let data = ctx.getImageData(0, 0,300,374);
let data = ctx.getImageData(0, 0,256,512);
return data;
}

View File

@ -85,10 +85,13 @@ deviceState[deviceType.Signal] = {
status: {
Default: '01', /** 关闭(缺省值)*/
State01: '01', /** 关闭 */
State02: '02', /** 开放 */
State03: '03', /** 引导 */
State04: '04', /** 封锁 */
State05: '05' /** 故障 */
State02: '02', /** 开放正向 */
State03: '03', /** 开放侧向 */
State04: '04', /** 引导 */
State05: '05', /** 封锁 */
State06: '06', /** 故障 */
State07: '07', /** 功能封锁 */
State08: '08' /** 信号保护区段监视 */
},
/** 信号机状态类型 */
lightType: {

View File

@ -230,9 +230,9 @@ class Signal extends Group {
}
}
// 开放
open() {
if (this.count == 2 && this.model.lightType == '01' && this.model.switchLocateType == '01') { // 双灯 物理点灯 道岔定位
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
openPositive() {
if (this.count == 2 && this.model.lightType == '01') {
if (this.lamps[0]) {
this.lamps[0].setStop(false);
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
@ -241,7 +241,7 @@ class Signal extends Group {
this.lamps[1].setStop(false);
this.lamps[1].setColor(this.style.backgroundColor);
}
} else if (this.count == 2 && this.model.lightType == '02' && this.model.switchLocateType == '01') { // 双灯 逻辑点灯 道岔定位
} else if (this.count == 2 && this.model.lightType == '02') {
if (this.lamps[0]) {
this.lamps[0].setStop(true);
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
@ -250,7 +250,21 @@ class Signal extends Group {
this.lamps[1].setStop(true);
this.lamps[1].setColor(this.style.backgroundColor);
}
} else if (this.count == 2 && this.model.lightType == '01' && this.model.switchLocateType == '02') { // 双灯 物理点灯 道岔反位
} else if (this.count == 1 && this.model.lightType == '01') {
if (this.lamps[0]) {
this.lamps[0].setStop(false);
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
}
} else if (this.count == 1 && this.model.lightType == '02') {
if (this.lamps[0]) {
this.lamps[0].setStop(true);
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
}
}
}
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
openLateral() {
if (this.count == 2 && this.model.lightType == '01') {
if (this.lamps[0]) {
this.lamps[0].setStop(false);
this.lamps[0].setColor(this.style.backgroundColor);
@ -259,7 +273,7 @@ class Signal extends Group {
this.lamps[1].setStop(false);
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
}
} else if (this.count == 2 && this.model.lightType == '02' && this.model.switchLocateType == '02') { // 双灯 逻辑点灯 道岔反位
} else if (this.count == 2 && this.model.lightType == '02') {
if (this.lamps[0]) {
this.lamps[0].setStop(true);
this.lamps[0].setColor(this.style.backgroundColor);
@ -268,7 +282,7 @@ class Signal extends Group {
this.lamps[1].setStop(true);
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
}
} else if (this.count == 1 && this.model.lightType == '01' && this.model.switchLocateType == '02') { // 单灯 物理点灯 允许调车
} else if (this.count == 1 && this.model.lightType == '01') {
if (this.lamps[0]) {
this.lamps[0].setStop(false);
// 出站信号机/阻隔信号机
@ -278,24 +292,13 @@ class Signal extends Group {
this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
}
}
} else if (this.count == 1 && this.model.lightType == '01' && this.model.switchLocateType == '01') {
if (this.lamps[0]) {
this.lamps[0].setStop(false);
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
}
} else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '02') {
if (this.lamps[0]) {
this.lamps[0].setStop(true);
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
}
} else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '01' ) {
} else if (this.count == 1 && this.model.lightType == '02') {
if (this.lamps[0]) {
this.lamps[0].setStop(true);
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
}
}
}
// 列车进路
trainRoute() {
if (this.count == 1) {
@ -437,12 +440,13 @@ class Signal extends Group {
/** 设置状态 (点灯类型)*/
switch (model.status) {
case '01': this.close(); break; // 关闭
case '02': this.open(); break; // 开放
case '03': this.guid(); break; // 引导
case '04': this.block(); break; // 封锁
case '05': this.fault(); break; // 故障
case '06': this.block(); break; // 功能封锁
case '07': this.signalCheck(); break; // 信号保护区段检测
case '02': this.openPositive(); break; // 开放正向
case '03': this.openLateral(); break; // 开放侧向
case '04': this.guid(); break; // 引导
case '05': this.block(); break; // 封锁
case '06': this.fault(); break; // 故障
case '07': this.block(); break; // 功能封锁
case '08': this.signalCheck(); break; // 信号保护区段检测
}
/** 进路性质类型*/

View File

@ -84,7 +84,6 @@ import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index';
import ProductStatus from '@/views/publish/productStatus/index';
import PublishLesson from '@/views/publish/publishLesson/index';
// import SimulationScript from '@/views/publish/simulationScript/index';
// import IbpDraft from '@/views/ibp/ibpDraft/index';
import IbpEdit from '@/views/ibp/ibpDraft/ibpEdit/index';
import Commodity from '@/views/orderauthor/commodity/index';

View File

@ -126,7 +126,7 @@ export default {
getTotalRemains(model).then(response => {
this.maxTotal = response.data;
if (this.maxTotal == 0) {
this.numberMessage = '可用权限数量为0';
this.numberMessage = this.$t('tip.theNumberOfPermissionsAvailableIsZero');
} else {
this.numberMessage = `${this.$t('global.remainPermissionNumber')}${this.maxTotal}`;
}
@ -134,7 +134,7 @@ export default {
this.$messageBox(this.$t('error.obtainMaxNumberFailed'));
});
} else {
this.numberMessage = '结束时间必须大于开始时间';
this.numberMessage = this.$t('tip.endTimeRules');
}
} else {
this.numberMessage = '';

View File

@ -23,7 +23,7 @@ export default {
backgroundColor: '#F0F2F5',
title: {
top: 20,
text: '仿真统计',
text: this.$t('dashboard.simulationStatistics'),
textStyle: {
fontWeight: 'normal',
fontSize: 18,
@ -139,7 +139,8 @@ export default {
this.option.series = [];
this.option.legend.data = [];
this.option.xAxis[0].data = ['综合演练云平台', '司机模拟驾驶系统', 'ATS行调工作站', 'ATS现地工作站'];
this.option.xAxis[0].data = [this.$t('dashboard.comprehensiveExerciseCloudPlatform'),
this.$t('dashboard.driverSimulatedDrivingSystem'), this.$t('dashboard.ATSLineAdjustmentWorkstation'), this.$t('dashboard.ATSLocalWorkstation')];
data.forEach(elem => {
this.option.legend.data.push(elem.name);
this.option.series.push({

View File

@ -2,7 +2,7 @@
<div>
<div :id="id" :style="{height: size.height+'px', width: size.width+'px'}" />
<div class="lesson-select">
<el-select v-model="lessonId" placeholder="请选择课程">
<el-select v-model="lessonId" :placeholder="this.$t('rules.selectCourses')">
<el-option v-for="item in lessonList" :key="item.statsProjectId" :label="item.statsProjectName" :value="item.statsProjectId" />
</el-select>
</div>
@ -32,7 +32,7 @@ export default {
backgroundColor: '#F0F2F5',
title: {
top: 20,
text: '考试统计',
text: this.$t('dashboard.testStatistics'),
textStyle: {
fontWeight: 'normal',
fontSize: 18,

View File

@ -23,7 +23,7 @@ export default {
backgroundColor: '#F0F2F5',
title: {
top: 20,
text: '课程统计',
text: this.$t('dashboard.courseStatistics'),
textStyle: {
fontWeight: 'normal',
fontSize: 18,
@ -139,7 +139,8 @@ export default {
this.option.series = [];
this.option.legend.data = [];
this.option.xAxis[0].data = ['控制权实训', ' 信号机实训', ' 道岔实训', '区段实训', '站台实训'];
this.option.xAxis[0].data = [this.$t('dashboard.controlRightsTraining'),
this.$t('dashboard.signalTraining'),this.$t('dashboard.turnoutTraining'), this.$t('dashboard.sectionTraining'), this.$t('dashboard.stationTraining')];
data.forEach(elem => {
this.option.legend.data.push(elem.statsProjectName);
this.option.series.push({

View File

@ -2,7 +2,7 @@
<div>
<div :id="id" :style="{height: size.height+'px', width: size.width+'px'}" />
<div class="lesson-select">
<el-select v-model="mapName" placeholder="请选择地图线路" size="mini" style="width: 300px">
<el-select v-model="mapName" :placeholder="this.$t('dashboard.selectTheMapRoute')" size="mini" style="width: 300px">
<el-option v-for="name in mapNameList" :key="name" :label="name" :value="name" />
</el-select>
</div>
@ -62,7 +62,7 @@ export default {
type: 'value',
show: false,
minInterval: 1,
name: '权限(个)'
name: this.$t('dashboard.permissions')
},
series: [{
type: 'bar',
@ -145,7 +145,6 @@ export default {
(permissionList ||[]).forEach(elem => {
permissionDict[elem.code] = elem.name;
});
var permissionMap = {
'ATS现地工作站-课程权限': 0,
'ATS行调工作站-课程权限': 0,
@ -170,8 +169,8 @@ export default {
const values = Object.values(permissionMap);
const sum = values.reduce((total, num) => { return total + num; });
this.option.title.text = `剩余权限分布图 —— ${mapName}`;
this.option.title.subtext = `权限总计${sum}`;
this.option.title.text = this.$t('dashboard.residualPermissionDistributionMap') + ` —— ${mapName}`;
this.option.title.subtext = this.$t('dashboard.totalPermissions') + `${sum}` + this.$t('dashboard.individual');
this.option.xAxis.show = true;
this.option.yAxis.show = true;
@ -181,8 +180,8 @@ export default {
this.option.series[0].data = values;
this.option.series[1].data = keys.filter(name => { return permissionMap[name]; } ).map(name => { return {name, value: permissionMap[name]}; });
} else {
this.option.title.text = `剩余权限分布图(暂无地图线路数据`;
this.option.title.subtext = `权限总计0`;
this.option.title.text =this.$t('dashboard.residualPermissionDistributionMap') + ``+ this.$t('dashboard.noMapLineDataYetAvailable') +``;
this.option.title.subtext = this.$t('dashboard.totalPermissions') + `0` + this.$t('dashboard.individual');
this.option.xAxis.show = false;
this.option.yAxis.show = false;
this.option.xAxis.data = [];

View File

@ -7,9 +7,9 @@
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
</el-button-group> -->
<el-button-group>
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{$t('scriptRecord.drivingByPlan')}}</el-button>
<!-- <el-button type="danger" :disabled="!isDisable" @click="end">退出计划</el-button> -->
<el-button type="primary" @click="back">返回</el-button>
<el-button type="primary" @click="back">{{$t('scriptRecord.scriptBack')}}</el-button>
</el-button-group>
</div>
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />

View File

@ -1,7 +1,7 @@
<template>
<el-card>
<div slot="header" style="text-align: center;">
<b>课程名称 {{ courseModel.name }}</b>
<b>{{ $t('exam.courseName') + ': '+ courseModel.name }}</b>
</div>
<div style=" margin:50px" :style="{ height: height - 150 +'px' }">
<!-- <p style="font-size: 14px; margin-bottom: 20px"> 课程说明:
@ -10,7 +10,7 @@
</span>
</p> -->
<el-tabs v-model="activeName">
<el-tab-pane label="试题列表" name="first">
<el-tab-pane :label="this.$t('exam.itemList')" name="first">
<div v-if="courseModel.detail.length != 0" :style="{ height: height - 230 +'px' }">
<el-scrollbar wrap-class="scrollbar-wrapper">
<template v-for="item in courseModel.detail">
@ -21,10 +21,10 @@
</el-scrollbar>
</div>
<div v-else class="noList">
暂无数据
{{ $t('global.temporarilyNoData') }}
</div>
</el-tab-pane>
<el-tab-pane label="权限详情" name="second">
<el-tab-pane :label="this.$t('exam.permissionsDetails')" name="second">
<div :style="{ height: height - 230 +'px' }">
<el-scrollbar wrap-class="scrollbar-wrapper">
<limit-list ref="limitList" :course-model="courseModel" @initLoadPage="loadInitPage" />
@ -34,10 +34,10 @@
</el-tabs>
</div>
<div class="btn-buy">
<el-button type="success" @click="buy">购买</el-button>
<el-button v-if="hasPermssion" type="primary" @click="distribute">权限分发(考试)</el-button>
<el-button v-if="hasPermssion" type="primary" @click="transfer">权限转赠</el-button>
<el-button v-if="isAddRule" type="primary" @click="checkCourse">查看课程试卷</el-button>
<el-button type="success" @click="buy">{{ $t('exam.buy') }}</el-button>
<el-button v-if="hasPermssion" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button>
<el-button v-if="isAddRule" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
</div>
</el-card>
</template>
@ -57,7 +57,7 @@ export default {
loading: false,
courseModel: {
id: '',
name: '请选择课程',
name: this.$t('rules.lessonInput'),
price: 0,
remarks: '',
detail: [],

View File

@ -1,41 +1,41 @@
<template>
<el-card>
<div slot="header" style="text-align: center;">
<b>试卷名称 {{ examDetails.name }}</b>
<b>{{ $t('exam.nameOfTestPaper') +': ' + examDetails.name }}</b>
</div>
<div style="margin:50px; overflow-y: auto;">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height - 190 +'px' }">
<p class="list-item">
<span class="list-label">考试时间</span>
<span class="list-label">{{ $t('exam.examStartTime') +':'}}</span>
<span v-if="examDetails.startTime" class="list-elem">
{{ examDetails.startTime }} - {{ examDetails.endTime }}</span>
<span v-else class="list-elem">随时都可以考试</span>
<span v-else class="list-elem">{{ $t('exam.theExamIsReadyAnyTime') }}</span>
</p>
<p class="list-item">
<span class="list-label">考试说明</span>
<span class="list-label">{{ $t('exam.testExplanation') + ':' }}</span>
<span class="list-elem">{{ examDetails.remarks }}</span>
</p>
<p class="list-item">
<span class="list-label">考试时长</span>
<span class="list-elem">{{ parseInt(examDetails.duration) / 60 }}分钟</span>
<span class="list-label">{{ $t('exam.examTimeAvailable') + ':' }}</span>
<span class="list-elem">{{ parseInt(examDetails.duration) / 60 + $t('global.minutes') }}</span>
</p>
<p class="list-item">
<span class="list-label">考试满分</span>
<span class="list-elem">{{ examDetails.fullPoint }}</span>
<span class="list-label">{{ $t('exam.fullMarksInTheExam') + ':' }}</span>
<span class="list-elem">{{ examDetails.fullPoint + $t('exam.points') }}</span>
</p>
<p class="list-item">
<span class="list-label">考试及格分</span>
<span class="list-elem">{{ examDetails.passingPoint }}</span>
<span class="list-label">{{ $t('exam.passMarkTheExam') + ':' }}</span>
<span class="list-elem">{{ examDetails.passingPoint + $t('exam.points') }}</span>
</p>
<p class="list-item">
<span class="list-label">考试规则</span>
<span class="list-label">{{ $t('exam.examinationRules') + ':' }}</span>
<span class="list-elem">
<p class="list-table">
<el-table :data="examDetails.examDefinitionRulesVOList" border show-summary>
<el-table-column prop="name" label="实训类型" width="180" />
<el-table-column prop="num" label="题数" />
<el-table-column prop="point" label="分值" />
<el-table-column prop="chapterIdLong" label="总分" />
<el-table-column prop="name" :label="this.$t('exam.trainingType')" width="180" />
<el-table-column prop="num" :label="this.$t('exam.numberOfQuestions')" />
<el-table-column prop="point" :label="this.$t('exam.score')" />
<el-table-column prop="chapterIdLong" :label="this.$t('exam.totalScore')" />
</el-table>
</p>
</span>
@ -43,7 +43,7 @@
</el-scrollbar>
</div>
<div class="btn-start">
<el-button :loading="loading" type="primary" @click="exmaStart">开始考试</el-button>
<el-button :loading="loading" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
</div>
</el-card>
</template>
@ -157,7 +157,7 @@ export default {
query: { permissionType: PermissionType.EXAM, prdCode: res.data.prdCode, mapId: res.data.mapId }
});
}).catch(() => {
this.$messageBox('获取课程详情失败');
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
this.loading = false;
});
@ -175,16 +175,16 @@ export default {
} catch (error) {
//
if (error.code === 500004) {
this.$confirm('无此课程的考试权限,请前往购买!', '提示', {
cancelButtonText: '取消',
confirmButtonText: '确定',
this.$confirm( this.$t('tip.noCourseAuthority'), this.$t('tip.hint'), {
cancelButtonText: this.$t('global.cancel'),
confirmButtonText: this.$t('global.confirm'),
type: 'warning',
center: true
}).then(() => {
this.buy();
}).catch(() => { });
} else if (error.code === 500005) {
this.$messageBox('不在考试范围之内');
this.$messageBox(this.$t('tip.notWithinTheScopeOfTheExamination'));
} else {
this.$messageBox(`${error.message}`);
}
@ -205,7 +205,7 @@ export default {
launchFullscreen();
}).catch(error => {
this.loading = false;
this.$messageBox(`创建仿真失败: ${error.message}`);
this.$messageBox( this.$t('error.createSimulationFailed') +`: ${error.message}`);
});
} else {
this.loading = false;

View File

@ -1,29 +1,29 @@
<template>
<el-card>
<div slot="header" style="text-align: center;">
<span class="title">实训名称 {{ courseModel.name }}</span>
<span class="title">{{this.$t('exam.trainingName')}} {{ courseModel.name }}</span>
</div>
<div style="margin:50px" :style="{ height: height - 150 +'px' }">
<p class="time-item">
<span class="time-label">考试计时</span>
<span class="time-label">{{this.$t('exam.examinationTiming')}}</span>
<span class="time-elem">{{ formatExamUsedTime }}</span>
</p>
<p class="list-item">
<span class="list-label">完成本题最大用时</span>
<span class="list-elem">{{ courseModel.maxDuration | setTime }} </span>
<span class="list-label">{{this.$t('exam.maximumTimeToCompleteThisQuestion')}}</span>
<span class="list-elem">{{ courseModel.maxDuration | setTime }}{{this.$t('global.second')}} </span>
</p>
<p class="list-item">
<span class="list-label">完成本题最佳用时</span>
<span class="list-elem">{{ courseModel.minDuration | setTime }} </span>
<span class="list-label">{{this.$t('exam.theBestTimeToCompleteTheQuestion')}}</span>
<span class="list-elem">{{ courseModel.minDuration | setTime }}{{this.$t('global.second')}}</span>
</p>
<p class="list-item">
<span class="list-label"> 实训说明</span>
<span class="list-label"> {{this.$t('exam.trainingNotes')}}</span>
<span class="list-elem">{{ courseModel.remarks }}</span>
</p>
<p>
<span class="list-label" />
<el-button :loading="loading" type="primary" @click="start">开始考试</el-button>
<el-button :loading="loading" type="danger" @click="back">放弃考试</el-button>
<el-button :loading="loading" type="primary" @click="start">{{this.$t('exam.startTheExam')}}</el-button>
<el-button :loading="loading" type="danger" @click="back">{{this.$t('exam.giveUpTheExam')}}</el-button>
</p>
</div>
</el-card>
@ -86,7 +86,7 @@ export default {
updateTime: res.data.updateTime
};
}).catch(error => {
this.$message.error('获取试题息失败:' + error.message);
this.$message.error( this.$t('error.getTestInformationFailed') + ':' + error.message);
});
}
},
@ -98,9 +98,9 @@ export default {
},
back() {
this.loading = true;
this.$confirm('此操作将放弃本次考试, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
this.$confirm( this.$t('tip.giveUpTheExamTip'), this.$t('tip.hint'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
//

View File

@ -1,7 +1,7 @@
<template>
<el-card v-loading="loading" class="map-list-main">
<div slot="header" class="clearfix">
<span>试题列表</span>
<span>{{ $t('exam.itemList') }}</span>
</div>
<filter-city
ref="filerCity"
@ -10,7 +10,7 @@
:query-function="queryFunction"
@filterSelectChange="refresh"
/>
<el-input v-model="filterText" placeholder="输入关键字进行过滤" clearable />
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-175) +'px' }">
<el-tree
ref="tree"

View File

@ -2,24 +2,24 @@
<div v-loading="loading">
<el-card class="paper" :style="{height: height - 10 + 'px'}">
<div slot="header" style="text-align: center;">
<span style="font-weight:bold ">考试结果详情</span>
<span style="font-weight:bold ">{{ $t('exam.examResultsDetails') }}</span>
</div>
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: height - 150 + 'px'}">
<div class="context">
<el-form ref="form" :model="resultModel" size="mini">
<el-form-item label="试题名称:" prop="name">
<el-form-item :label="this.$t('exam.testQuestionsName')+':'" prop="name">
<span>{{ resultModel.examName }}</span>
</el-form-item>
<el-form-item label="考试得分:" prop="score">
<span>{{ resultModel.score + ' 分' }}</span>
<el-form-item :label="this.$t('exam.testScores')+':'" prop="score">
<span>{{ resultModel.score + ' '+ $t('exam.points') }}</span>
</el-form-item>
<el-form-item label="是否通过:" prop="detail">
<span v-if="resultModel.result === '01'" style="color:darkgray">未计算</span>
<span v-else-if="resultModel.result === '02'" style="color:green">通过</span>
<span v-else-if="resultModel.result === '03'" style="color:red">未通过</span>
<el-form-item :label="this.$t('exam.whetherThrough')+':'" prop="detail">
<span v-if="resultModel.result === '01'" style="color:darkgray">{{ $t('exam.didNotCalculate') }}</span>
<span v-else-if="resultModel.result === '02'" style="color:green">{{ $t('exam.pass') }}</span>
<span v-else-if="resultModel.result === '03'" style="color:red">{{ $t('exam.notPass') }}</span>
</el-form-item>
<el-form-item label="考试用时:" prop="detail">
<span>{{ Math.ceil(resultModel.usedTime/60) + ' 分钟' }}</span>
<el-form-item :label="this.$t('exam.examTime')+':'" prop="detail">
<span>{{ Math.ceil(resultModel.usedTime/60) + ' '+ $t('global.minutes') }}</span>
</el-form-item>
</el-form>
<el-table
@ -29,13 +29,13 @@
:summary-method="getSummaries"
show-summary
>
<el-table-column prop="trainingName" label="实训名称" />
<el-table-column prop="score" label="实训得分" />
<el-table-column prop="trainingName" :label="this.$t('exam.trainingName')" />
<el-table-column prop="score" :label="this.$('exam.trainingScore')" />
</el-table>
</div>
</el-scrollbar>
<div style="position: relative; float: right; right: 60px; bottom: -30px;">
<el-button type="primary " @click="back">返回考试列表</el-button>
<el-button type="primary " @click="back">{{ $t('exam.returnToExamList') }}</el-button>
</div>
</el-card>
</div>
@ -75,7 +75,7 @@ export default {
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总分';
sums[index] = this.$t('exam.totalScore');
return;
}
const values = data.map(item => Number(item[column.property]));
@ -88,7 +88,7 @@ export default {
return prev;
}
}, 0);
sums[index] += ' 分';
sums[index] += this.$('exam.points');
} else {
sums[index] = 'N/A';
}
@ -110,7 +110,7 @@ export default {
this.loading = false;
clearInterval(interval);
interval = null;
this.$messageBox('自动提交考试结果失败');
this.$messageBox(this.$t('error.submitExamFailed'));
}
});
}, 1000);

View File

@ -7,10 +7,13 @@
</el-input>
</el-form-item>
<el-form-item label="扶梯框宽度" prop="appendageBoxWidth">
<el-input-number v-model="form.appendageBoxWidth" controls-position="right" :min="1"></el-input-number>
<el-input-number v-model="form.appendageBoxWidth" controls-position="right" :min="50"></el-input-number>
</el-form-item>
<el-form-item label="扶梯框高度" prop="appendageBoxHeight">
<el-input-number v-model="form.appendageBoxHeight" controls-position="right" :min="1"></el-input-number>
<el-input-number v-model="form.appendageBoxHeight" controls-position="right" :min="75"></el-input-number>
</el-form-item>
<el-form-item label="边框宽度" prop="borderWidth">
<el-input-number v-model="form.borderWidth" controls-position="right" :min="1"></el-input-number><span>&nbsp&nbsp(建议尺寸25)</span>
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
@ -42,7 +45,8 @@
appendageBoxWidth: '',
appendageBoxHeight: '',
x: 10,
y: 10
y: 10,
borderWidth: 25
},
rules: {
code: [
@ -53,6 +57,9 @@
],
appendageBoxHeight: [
{ required: true, message: '请输入扶梯框高度', trigger: 'blur' },
],
borderWidth: [
{ required: true, message: '请输入边框宽度', trigger: 'blur'},
]
}
};
@ -72,6 +79,7 @@
this.form.appendageBoxHeight = model.height;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.borderWidth = model.borderWidth
}
}
},
@ -89,7 +97,8 @@
_type: 'AppendageBox',
code: this.form.code,
width: this.form .appendageBoxWidth,
height: this.form.appendageBoxHeight
height: this.form.appendageBoxHeight,
borderWidth: this.form.borderWidth
};
this.$emit('createAppendageBox', appendageBoxModel);
this.initPage();
@ -107,7 +116,8 @@
_type: 'AppendageBox',
code: this.form.code,
width: this.form .appendageBoxWidth,
height: this.form.appendageBoxHeight
height: this.form.appendageBoxHeight,
borderWidth: this.form.borderWidth
};
this.$emit('deleteDataModel',appendageBoxModel );
this.initPage();
@ -120,6 +130,7 @@
code: '',
appendageBoxWidth: '',
appendageBoxHeight: '',
borderWidth: 25,
x: 10,
y: 10
};

View File

@ -21,7 +21,7 @@
<el-input-number v-model="form.arrowWidth" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="箭头颜色" prop="fillColor">
<el-input v-model="form.fillColor"></el-input>
<el-color-picker v-model="form.fillColor"></el-color-picker>
</el-form-item>
<el-form-item label="顶点X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
@ -50,7 +50,7 @@
showDeleteButton: false,
form: {
code: '',
orientation: '',
orientation: 'left',
arrowWidth: '',
arrowLength: '',
fillColor: '',
@ -144,7 +144,7 @@
this.showDeleteButton = false;
this.form = {
code: '',
orientation: '',
orientation: 'left',
arrowWidth: '',
arrowLength: '',
fillColor: '',

View File

@ -24,9 +24,10 @@
data() {
return {
form: {
bgWidth: '',
bgHeight: ''
bgWidth: this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.width:1,
bgHeight: this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.height:1,
},
code: this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.code:'',
rules: {
bgWidth: [
{ required: true, message: '请输入背景板宽度', trigger: 'blur' },
@ -57,12 +58,16 @@
x: 0,
y: 0,
_type: 'Background',
code: this.code,
width: this.form .bgWidth,
height: this.form.bgHeight
};
this.$emit('createBg', bgModel)
this.$emit('updateBg', bgModel)
},
initPage(){
this.form.bgWidth = this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.width:1;
this.form.bgHeight = this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.height:1;
this.code = this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.code:'';
}
}
};

View File

@ -45,8 +45,8 @@
showDeleteButton: false,
form: {
code: '',
buttonColor: '',
buttonWidth: '',
buttonColor: 'red',
buttonWidth: 25,
x: 10,
y: 10
},
@ -126,8 +126,8 @@
this.showDeleteButton = false;
this.form = {
code: '',
buttonColor: '',
buttonWidth: '',
buttonColor: 'red',
buttonWidth: 25,
x: 10,
y: 10
};

View File

@ -6,12 +6,9 @@
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="钥匙宽度" prop="keyWidth">
<el-form-item label="钥匙宽度" prop="keyWidth">
<el-input-number v-model="form.keyWidth" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="钥匙高度" prop="keyHeight">
<el-input-number v-model="form.keyHeight" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="钥匙朝向" prop="status">
<el-select v-model="form.status" placeholder="请选择钥匙朝向">
<el-option label="水平" value="on"></el-option>
@ -23,6 +20,12 @@
</el-form-item>
<el-form-item label="Y轴坐标">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="上侧文字" prop="topText">
<el-input v-model="form.topText"></el-input>
</el-form-item>
<el-form-item label="下侧文字" prop="bottomText">
<el-input v-model="form.bottomText"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
@ -46,10 +49,11 @@
form: {
code: '',
keyWidth: '',
keyHeight: '',
status:'',
status:'on',
x: 10,
y: 10
y: 10,
topText:'',
bottomText:''
},
rules: {
code: [
@ -58,12 +62,15 @@
keyWidth: [
{ required: true, message: '请输入钥匙孔宽度', trigger: 'blur' },
],
keyHeight: [
{ required: true, message: '请输入钥匙孔高度', trigger: 'blur' },
],
status: [
{ required: true, message: '请选择钥匙朝向', trigger: 'change' },
],
topText: [
{ required: true, message: '请输入上侧文字', trigger: 'blur' },
],
bottomText: [
{ required: true, message: '请输入下侧文字', trigger: 'blur' },
],
}
};
},
@ -79,10 +86,11 @@
this.isUpdate = true;
this.form.code = model.code;
this.form.keyWidth = model.width;
this.form.keyHeight = model.height;
this.form.status = model.status;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.topText = model.topText;
this.form.bottomText = model.bottomText;
}
}
},
@ -101,8 +109,9 @@
_type: 'Key',
code: this.form.code,
width: this.form.keyWidth,
height: this.form.keyHeight,
status:this.form.status
status:this.form.status,
topText:this.form.topText,
bottomText:this.form.bottomText,
};
this.$emit('createKey', keyModel);
this.initPage();
@ -122,8 +131,9 @@
_type: 'Key',
code: this.form.code,
width: this.form .keyWidth,
height: this.form.keyHeight,
status:this.form.status
status:this.form.status,
topText:this.form.topText,
bottomText:this.form.bottomText,
};
this.$emit('deleteDataModel',keyModel);
this.initPage();
@ -135,10 +145,11 @@
this.form = {
code: '',
keyWidth: '',
keyHeight: '',
status:'',
status:'on',
x: 10,
y: 10
y: 10,
topText:'',
bottomText:'',
};
},
generateCode() {

View File

@ -10,7 +10,7 @@
<el-input-number v-model="form.lineWidth" controls-position="right" :min="1" :max="50"></el-input-number>
</el-form-item>
<el-form-item label="线段颜色" prop="fillColor">
<el-input v-model="form.fillColor"></el-input>
<el-color-picker v-model="form.fillColor"></el-color-picker>
</el-form-item>
<el-form-item label="起始X轴坐标">
<el-input-number v-model="form.x1" controls-position="right" :min="0"></el-input-number>
@ -46,7 +46,7 @@
form: {
code: '',
lineWidth: '',
fillColor: '',
fillColor: '#000000',
x1: 10,
y1: 10,
x2: 20,

View File

@ -16,7 +16,7 @@
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="提示颜色" prop="rotateTipColor">
<el-select v-model="form.rotateTipColor" placeholder="请选择按钮颜色">
<el-select v-model="form.rotateTipColor" placeholder="请选择提示颜色">
<el-option label="红色" value="red"></el-option>
<el-option label="黑色" value="black"></el-option>
</el-select>

View File

@ -1,128 +0,0 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item label="钥匙孔编号" prop="code">
<el-input :disabled="true" v-model="form.code" >
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="钥匙孔宽度" prop="rotatingButtonWidth">
<el-input-number v-model="form.rotatingButtonWidth" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="Y轴坐标">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: 'RotatingButtonDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
rotatingButtonWidth: '',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: '请输入钥匙孔编号', trigger: 'blur' },
],
rotatingButtonWidth: [
{ required: true, message: '请输入钥匙孔宽度', trigger: 'blur' },
]
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'RotatingButton' ){
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.rotatingButtonWidth = model.width;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const rotatingButtonModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'RotatingButton',
code: this.form.code,
width: this.form .rotatingButtonWidth,
};
this.$emit('createRotatingButton', rotatingButtonModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const rotatingButtonModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'RotatingButton',
code: this.form.code,
width: this.form .rotatingButtonWidth,
};
this.$emit('deleteDataModel',rotatingButtonModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
rotatingButtonWidth: '',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = "rButton_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>

View File

@ -2,7 +2,7 @@
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item label="端子编号" prop="code">
<el-input :disabled="true" v-model="form.code" style="width:300px">
<el-input :disabled="true" v-model="form.code">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>

View File

@ -1,19 +1,28 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item label="提示框编号" prop="code">
<el-form-item label="矩形编号" prop="code">
<el-input :disabled="true" v-model="form.code" >
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="提示框宽度" prop="tipBoxWidth">
<el-form-item label="矩形宽度" prop="tipBoxWidth">
<el-input-number v-model="form.tipBoxWidth" controls-position="right" :min="1" ></el-input-number>
</el-form-item>
<el-form-item label="提示框高度" prop="tipBoxHeight">
<el-form-item label="矩形高度" prop="tipBoxHeight">
<el-input-number v-model="form.tipBoxHeight" controls-position="right" :min="1" ></el-input-number>
</el-form-item>
<el-form-item label="提示框颜色" prop="fillColor">
<el-input v-model="form.fillColor"></el-input>
<el-form-item label="填充颜色" prop="fillColor">
<el-color-picker v-model="form.fillColor"></el-color-picker>
</el-form-item>
<el-form-item label="填充透明颜色">
<el-switch v-model="opacity"></el-switch>
</el-form-item>
<el-form-item label="边框线宽" prop="lineWidth">
<el-input-number v-model="form.lineWidth" controls-position="right" :min="0" ></el-input-number>
</el-form-item>
<el-form-item label="边线颜色" prop="stroke">
<el-color-picker v-model="form.stroke"></el-color-picker>
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
@ -41,13 +50,16 @@
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
opacity: false,
form: {
code: '',
tipBoxWidth: '',
tipBoxHeight: '',
fillColor: '',
fillColor: '#CE950F',
x: 10,
y: 10
y: 10,
lineWidth: 0,
stroke: ''
},
rules: {
code: [
@ -81,6 +93,9 @@
this.form.fillColor = model.fillColor;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.opacity = model.opacity;
this.form.lineWidth = model.lineWidth;
this.form.stroke = model.stroke;
}
}
},
@ -99,7 +114,10 @@
_type: 'TipBox',
width: this.form.tipBoxWidth,
height: this.form.tipBoxHeight,
fillColor: this.form.fillColor
fillColor: this.form.fillColor,
opacity: this.opacity,
lineWidth: this.form.lineWidth,
stroke: this.form.stroke
};
this.$emit('createTipBox', tipBoxModel);
this.initPage();
@ -119,7 +137,10 @@
_type: 'TipBox',
width: this.form.tipBoxWidth,
height: this.form.tipBoxHeight,
fillColor: this.form.fillColor
fillColor: this.form.fillColor,
opacity: this.opacity,
lineWidth: this.form.lineWidth,
stroke: this.form.stroke
};
this.$emit('deleteDataModel',tipBoxModel);
this.initPage();
@ -134,7 +155,10 @@
tipBoxHeight: '',
fillColor: '',
x: 10,
y: 10
y: 10,
opacity: false,
lineWidth: 0,
stroke: ''
};
},
generateCode() {

View File

@ -3,7 +3,7 @@
<div class="map-control">
<el-card type="border-card">
<div slot="header" class="clearfix">
<span>车站名称</span>
<span>车站名称</span>
<el-select v-model="stationCode" @change="changeStationCode" placeholder="请选择车站">
<el-option
v-for="item in stationOptions"
@ -20,90 +20,88 @@
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="背景板" name="Background">
<ibp-bg
@createBg="createDataModel"
<ibp-bg ref="background"
@updateBg="createDataModel" style="width:90%"
></ibp-bg>
</el-tab-pane>
<el-tab-pane label="线条" name="IbpLine">
<ibp-line ref="ibpline"
@createLine="createDataModel" @deleteDataModel="deleteDataModel"
@createLine="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-line>
</el-tab-pane>
<el-tab-pane label="文字" name="IbpText">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-text ref="ibptext"
@createText="createDataModel" @deleteDataModel="deleteDataModel"
@createText="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-text>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane label="提示框" name="TipBox">
<el-tab-pane label="矩形" name="TipBox">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-tip-box ref="tipbox"
@createTipBox="createDataModel" @deleteDataModel="deleteDataModel"
@createTipBox="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
></ibp-tip-box>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane label="按钮" name="SquareButton">
<ibp-button ref="squarebutton"
@createButton="createDataModel" @deleteDataModel="deleteDataModel"
@createButton="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-button>
</el-tab-pane>
<el-tab-pane label="圆形指示灯" name="CircularLamp">
<ibp-lamp ref="circularlamp"
@createLamp="createDataModel" @deleteDataModel="deleteDataModel"
@createLamp="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-lamp>
</el-tab-pane>
<el-tab-pane label="箭头" name="Arrow">
<ibp-arrow ref="arrow"
@createArrow="createDataModel" @deleteDataModel="deleteDataModel"
@createArrow="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-arrow>
</el-tab-pane>
<el-tab-pane label="扶梯框" name="AppendageBox">
<ibp-appendage-box ref="appendagebox"
@createAppendageBox="createDataModel" @deleteDataModel="deleteDataModel"
@createAppendageBox="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-appendage-box>
</el-tab-pane>
<el-tab-pane label="报警器" name="Alarm">
<ibp-alarm ref="alarm"
@createAlarm="createDataModel" @deleteDataModel="deleteDataModel"
@createAlarm="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-alarm>
</el-tab-pane>
<el-tab-pane label="钥匙孔" name="RotatingButton">
<ibp-rotating-button ref="rotatingbutton"
@createRotatingButton="createDataModel" @deleteDataModel="deleteDataModel"
>
</ibp-rotating-button>
</el-tab-pane>
<el-tab-pane label="电话端子" name="TeleTerminal">
<ibp-telephone-terminal ref="teleTerminal"
@createTeleTerminal="createDataModel" @deleteDataModel="deleteDataModel"
@createTeleTerminal="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-telephone-terminal>
</el-tab-pane>
<el-tab-pane label="电梯" name="Elevator">
<ibp-elevator ref="elevator"
@createElevator="createDataModel" @deleteDataModel="deleteDataModel"
@createElevator="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-elevator>
</el-tab-pane>
<el-tab-pane label="钥匙" name="Key">
<ibp-key ref="key"
@createKey="createDataModel" @deleteDataModel="deleteDataModel"
@createKey="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-key>
</el-tab-pane>
<el-tab-pane label="电子表" name="Clock">
<ibp-clock ref="clock"
@createClock="createDataModel" @deleteDataModel="deleteDataModel"
@createClock="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-clock>
</el-tab-pane>
<el-tab-pane label="旋转提示" name="RotateTip">
<ibp-rotate-tip ref="rotateTip"
@createRotateTip="createDataModel" @deleteDataModel="deleteDataModel"
@createRotateTip="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
>
</ibp-rotate-tip>
</el-tab-pane>
@ -125,7 +123,6 @@
import IbpAppendageBox from './ibpAppendageBox';
import IbpArrow from './ibpArrow';
import IbpLamp from './ibpLamp';
import IbpRotatingButton from './ibpRotatingButton';
import IbpLine from './ibpLine';
import IbpTelephoneTerminal from './ibpTelephoneTerminal';
import IbpElevator from './ibpElevator';
@ -144,7 +141,6 @@
IbpAppendageBox,
IbpArrow,
IbpLamp,
IbpRotatingButton,
IbpLine,
IbpTelephoneTerminal,
IbpElevator,
@ -157,7 +153,7 @@
],
data() {
return {
enabledTab: 'BgImage',
enabledTab: 'Background',
data: '',
stationOptions:[
{
@ -173,7 +169,8 @@
label: '枣园站'
}
],
stationCode: ''
stationCode: '',
height: this.$store.state.app.height - 190
};
},
watch: {
@ -190,12 +187,7 @@
},
methods: {
createDataModel(model) {
if(model._type === deviceType.Background) {
const bgDevice = this.$store.getters['ibp/ibpBgDevice'];
model.code = bgDevice.model.code;
}
const newModel = deviceFactory(model._type, model);
this.$store.dispatch('ibp/updateIbpDevices', newModel.model);
},
deleteDataModel(model) {
@ -207,6 +199,7 @@
},
changeStationCode(e) {
this.$emit('ibpChange',e);
this.handleTabClick();
},
handleTabClick() {
this.$refs.ibpline.initPage();
@ -217,13 +210,20 @@
this.$refs.arrow.initPage();
this.$refs.appendagebox.initPage();
this.$refs.alarm.initPage();
this.$refs.rotatingbutton.initPage();
this.$refs.elevator.initPage();
this.$refs.key.initPage();
this.$refs.teleTerminal.initPage();
this.$refs.clock.initPage();
this.$refs.rotateTip.initPage();
this.$refs.background.initPage();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.map-control {
float: right;
width: 100%;
}
</style>

View File

@ -22,23 +22,20 @@ export default {
},
data() {
return {
mapSaveing: false,
viewDraft: 'draft',
autoSaveTask: null,
selected: null,
mapInfo: { name: '' },
timeDemon: null,
size: {
width: this.$store.state.app.width-521,
height: this.$store.state.app.height - 60
},
}
};
},
watch: {
'$store.state.app.windowSizeCount': function() {
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521, height: this.$store.state.app.height });
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521, height: this.$store.state.app.height - 60 });
}
},
created() {
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521, height: this.$store.state.app.height - 60 });
},
mounted() {
this.$refs.ibpPlate.show();
this.$refs.ibpPlate.drawIbpInit();
@ -47,12 +44,6 @@ export default {
},
methods: {
endViewLoading(isSuccess) {
},
selectViewDraft(data) {
this.viewDraft = data;
},
ibpChange(stationCode) {
this.$refs.ibpPlate.show(stationCode);
this.$refs.ibpPlate.drawIbpInit();
@ -75,7 +66,10 @@ export default {
float: left;
width: 60%;
}
.mapPaint{
height: 100%;
overflow: hidden;
}
.map-draft {
float: right;
width: 520px;
@ -85,16 +79,4 @@ export default {
// height: calc(100% - 40px);
// }
}
.physical-view {
line-height: 25px;
height: 60px;
padding-left: 12px;
.el-checkbox {
width: 70px;
margin: 0;
margin-right: 12px;
}
}
</style>

View File

@ -1,61 +0,0 @@
<template>
<div id="mapMain" class="ibpDraft">
<div class="map-list" :style="{width: widthLeft+'px'}">
<span>车站列表</span>
</div>
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
<transition>
<router-view />
</transition>
</div>
</template>
<script>
import localStore from 'storejs';
import DrapLeft from '@/views/components/drapLeft/index';
export default {
name: 'IbpDraft',
components: {
DrapLeft
},
data() {
return {
widthLeft: 320
};
},
watch: {
widthLeft(val) {
this.setMapResize(val);
},
'$store.state.app.windowSizeCount': function() {
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
const width = this.$store.state.app.width - 521 - this.widthLeft;
const height = this.$store.state.app.height - 90;
this.$store.dispatch('config/resize', { width: width, height: height });
}
},
methods: {
drapWidth(width) {
this.widthLeft = Number(width);
},
setMapResize(LeftWidth) {
const widths =this.$store.state.app.width - 521 - LeftWidth;
const heights = this.$store.state.app.height - 90;
this.$store.dispatch('config/resize', { width: widths, height: heights });
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.ibpDraft {
overflow: hidden;
.map-list {
float: left;
height: 100%;
}
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div>
<div :id="ibpId" :style="{ width: '100%', height: '100%',background:'#000' }" class="ibp-canvas" />
<div :id="ibpId" :style="{ width: this.canvasWidth +'px', height: this.canvasHeight +'px',background:'#000' }" class="ibp-canvas" v-loading="loading" />
<el-button v-if="showBackButton" class="ibp-button" type="primary" @click="back">返回</el-button>
</div>
</template>
@ -40,7 +40,8 @@ export default {
},
showBackButton: true,
initTime: '',
started: false
started: false,
loading: false
};
},
computed: {
@ -87,6 +88,7 @@ export default {
return false;
};
this.ibpDestroy();
this.loading = true;
const data = parser(ibpData[deviceCode], {width: this.canvasWidth, height: this.canvasHeight});
this.$ibp = new IbpPan({
dom: document.getElementById(this.ibpId),
@ -101,9 +103,7 @@ export default {
offsetY: 0
},
methods: {
dataLoaded: this.handleDataLoaded,
viewLoaded: this.handleViewLoaded,
stateLoaded: this.handleStateLoaded
}
});
Vue.prototype.$ibp = this.$ibp;
@ -161,6 +161,9 @@ export default {
this.$ibp = '';
Vue.prototype.$ibp = '';
}
},
handleViewLoaded() {
this.loading = false;
}
}
};

View File

@ -74,7 +74,7 @@ export default {
prop: 'organizationName'
},
{
title: '权限名称',
title: this.$t('orderAuthor.permissionName'),
prop: 'permissionName'
},
{

View File

@ -16,7 +16,7 @@
style="width: 100%"
:height="height-300"
>
<el-table-column prop="permissionName" label="权限名称" />
<el-table-column prop="permissionName" :label="this.$t('orderAuthor.permissionName')" />
<!-- <el-table-column prop="mapProductName" :label="this.$t('orderAuthor.mapProductName')" width="120" />
<el-table-column prop="lessonName" :label="this.$t('orderAuthor.courseName')" width="100" />
<el-table-column prop="permissionType" :label="this.$t('orderAuthor.permissionType')" width="100"> -->

View File

@ -48,7 +48,7 @@ export default {
// },
'status': {
type: 'select',
label: '状态',
label: this.$t('global.status'),
value: '1',
config: {
data: []
@ -66,7 +66,7 @@ export default {
prop: 'organizationName'
},
{
title: '权限名称',
title: this.$t('orderAuthor.permissionName'),
prop: 'permissionName'
},
{
@ -121,11 +121,11 @@ export default {
}
},
{
title: '总数量',
title: this.$t('global.amount'),
prop: 'amount'
},
{
title: '剩余数量',
title: this.$t('global.remains'),
prop: 'remains'
},
{
@ -142,7 +142,7 @@ export default {
formatter: this.formatterDate
},
{
title: '状态',
title: this.$t('global.status'),
prop: 'status',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
@ -175,20 +175,14 @@ export default {
name: this.$t('orderAuthor.recovery'),
handleClick: this.handleRestore,
type: 'danger',
showControl: (row) => { return row.status == '1' && row.source == '04'; }
},
{
name: this.$t('orderAuthor.unpacking'),
handleClick: this.handleUnPackage,
type: 'danger',
showControl: (row) => { return row.status == '1' && row.source == '02'; }
showControl: (row) => { return row.status == '1' && row.source == '03' || row.source == '04' || row.source =='05'; }
}
]
}
],
actions: [
{ text: this.$t('orderAuthor.privilegePackaging'), btnCode: 'employee_insert', handler: this.handlePackage },
{ text: '领取权限', handler: this.handlerPermission, show: process.env.NODE_ENV == 'development' }
{ text: this.$t('orderAuthor.receivingPermission'), handler: this.handlerPermission, show: process.env.NODE_ENV == 'development' }
]
}
};
@ -255,20 +249,6 @@ export default {
});
}).catch(() => { });
},
handleUnPackage(index, row) {
this.$confirm(this.$t('tip.unpackingTip'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
permissionDistributeUnPackage(row.id).then(resp => {
this.reloadTable();
this.$message.success(this.$t('tip.unpackingSuccessful'));
}).catch(() => {
this.$messageBox(this.$t('tip.unpackingFailed'));
});
}).catch(() => { });
},
handlePackage() {
this.$router.push({ path: `${UrlConfig.orderauthor.trainferPackage}` });
},

View File

@ -60,7 +60,7 @@ export default {
indexShow: true,
columns: [
{
title: '权限名称',
title: this.$t('permission.permissionName'),
width: '210',
prop: 'permissionName'
},

View File

@ -1,8 +1,8 @@
<template>
<el-card v-loading="loading" class="map-list-main">
<div slot="header" class="clearfix">
<span class="mapListTitle">地图列表</span>
<el-button type="primary" size="small" @click="addScript" class="addScript">添加剧本</el-button>
<span class="mapListTitle">{{ $t('scriptRecord.mapList') }}</span>
<el-button type="primary" size="small" @click="addScript" class="addScript">{{ $t('scriptRecord.addScript') }}</el-button>
</div>
<el-select v-model="mapSelect" size="medium" class="mapSelect" @change="mapSelectChange">
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id" />

View File

@ -2,15 +2,15 @@
<el-card :style="{height: height+'px'}">
<div class="home-box">
<el-card class="box-card">
<div id="scriptTitle">剧本详情</div>
<div id="scriptTitle">{{$t('scriptRecord.scriptDetail')}}</div>
<div id="sciptForm">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
</div>
<div id="btnList">
<span slot="footer" class="btn-footer">
<el-button type="success" @click="drawUp">编制</el-button>
<el-button type="primary" @click="modifyScript">修改</el-button>
<el-button type="danger" @click="deleteScript">删除</el-button>
<el-button type="success" @click="drawUp">{{$t('scriptRecord.scriptRecord')}}</el-button>
<el-button type="primary" @click="modifyScript">{{$t('scriptRecord.scriptModify')}}</el-button>
<el-button type="danger" @click="deleteScript">{{$t('scriptRecord.scriptDelete')}}</el-button>
</span>
</div>
</el-card>
@ -18,6 +18,10 @@
</el-card>
</template>
<script>
import { UrlConfig } from '@/router/index';
import {listPublishMap} from '@/api/jmap/map';
@ -43,11 +47,11 @@ export default {
computed: {
form() {
const form = {
labelWidth: '100px',
labelWidth: '150px',
items: [
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
{ prop: 'mapId', label: '地图', type: 'select', required: true, options: this.mapList, disabled: this.disabled},
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true}
{ prop: 'name', label: this.$t('scriptRecord.scriptName'), type: 'text', required: true},
{ prop: 'mapId', label: this.$t('scriptRecord.map'), type: 'select', required: true, options: this.mapList, disabled: this.disabled},
{ prop: 'description', label: this.$t('scriptRecord.scriptDescription'), type: 'textarea', required: true}
]
};
return form;
@ -55,13 +59,15 @@ export default {
rules() {
const crules = {
name: [
{ required: true, message: '请输入剧本', trigger: 'blur' }
{ required: true, message: this.$t('scriptRecord.scriptNameRule'), trigger: 'blur' },
{ required: true, message: this.$t('scriptRecord.scriptNameRule'), trigger: 'change' }
],
mapId: [
{ required: true, message: '请选择地图', trigger: 'change' }
],
description: [
{ required: true, message: '请输入剧本描述', trigger: 'blur' }
{ required: true, message: this.$t('scriptRecord.scriptDescriptionRule'), trigger: 'blur' },
{ required: true, message: this.$t('scriptRecord.scriptDescriptionRule'), trigger: 'change' }
]
};
return crules;
@ -90,7 +96,7 @@ export default {
this.formModel=data;
this.formModel.id=scriptId;
}).catch(error => {
this.$message.error('获取剧本信息失败:' + error.message);
this.$message.error(this.$t('scriptRecord.getScriptFail')+':' + error.message);
});
}
},
@ -101,31 +107,31 @@ export default {
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
});
},
modifyScript() {
const data=this.formModel;
updateQuest(data.id, data).then(resp => {
this.$emit('refresh');
this.$message.success('修改剧本成功');
this.$message.success(this.$t('scriptRecord.modifyScriptSuccess'));
}).catch(error => {
this.$messageBox(`修改剧本失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.modifyScriptFail')}: ${error.message}`);
});
},
deleteScript() {
const data=this.formModel;
this.$confirm('此操作将删除此剧本, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('scriptRecord.operateTip'), {
confirmButtonText: this.$t('scriptRecord.confirmButtonText'),
cancelButtonText: this.$t('scriptRecord.cancelButtonText'),
type: 'warning'
}).then(() => {
deleteQuest(data.id).then(response => {
this.$message.success('删除成功');
this.$message.success(this.$t('scriptRecord.deleteScriptSucess'));
this.$emit('refresh');
this.$router.push({ path: `${UrlConfig.script.prefix}` });
}).catch(() => {
this.$messageBox('删除失败');
this.$messageBox(this.$t('scriptRecord.deleteScriptFail'));
});
}).catch(() => { });
}

View File

@ -4,7 +4,7 @@
<el-container class="actionPane">
<el-header style="height:50px;">
<el-row class="actionList">
<span class="titleStyle">剧本编制</span>
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
</el-row>
</el-header>
<el-main style="padding-top:10px;padding-bottom:10px;">
@ -14,9 +14,9 @@
</el-main>
<el-footer>
<el-button-group class="button-group">
<el-button v-if="isPause" type="primary" :disabled="executeDisabled" @click="pauseScript">暂停</el-button>
<el-button v-else type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复并执行</el-button>
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
<el-button v-if="isPause" type="primary" :disabled="executeDisabled" @click="pauseScript">{{ $t('scriptRecord.drivingPause') }}</el-button>
<el-button v-else type="primary" :disabled="executeDisabled" @click="executePlayScript">{{ $t('scriptRecord.recoverAndExecute') }}</el-button>
<el-button type="danger" @click="dumpScenesData">{{ $t('scriptRecord.resetScript') }}</el-button>
<el-button type="primary" :disabled="backDisabled" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</el-button>
<el-button type="success" :loading="isSavingScript" @click="saveScenesData">{{ $t('scriptRecord.saveData') }}</el-button>
<!-- 暂停 -->
@ -24,6 +24,10 @@
</el-footer>
</el-container>
</div>
</div>
</template>
<script>
@ -48,7 +52,7 @@ export default {
},
data() {
return {
title: '剧本编制',
title: this.$t('scriptRecord.scriptRecordTitle'),
isShrink: false,
mapLocation: {},
autoSaveScript: null,
@ -99,14 +103,14 @@ export default {
scriptPause(this.group).then(resp => {
this.$store.dispatch('scriptRecord/updateSimulationPause', true);
}).catch(() => {
this.$messageBox('暂停失败!');
this.$messageBox(this.$t('scriptRecord.pauseFail'));
});
},
executePlayScript() {
executeScript(this.group).then(resp => {
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
}).catch(() => {
this.$messageBox('恢复失败!');
this.$messageBox(this.$t('scriptRecord.recoverFail'));
});
},
saveScenesStage() {
@ -116,23 +120,23 @@ export default {
saveScriptScenes(this.group).then(resp => {
updateMapLocation(group, dataZoom).then(response=>{
this.$store.dispatch('scriptRecord/updateBgSet', true);
this.$message.success('保存背景成功');
this.$message.success(this.$t('scriptRecord.saveBackgroundSuceess'));
}).catch(error => {
this.$messageBox(`更新定位失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.updateLocationFail')}: ${error.message}`);
});
}).catch(() => {
this.$messageBox('保存背景失败!');
this.$messageBox(this.$t('scriptRecord.saveBackgroundFail'));
});
},
saveScenesData() {
this.isSavingScript=true;
saveScriptData(this.group).then(resp => {
this.$message.success('保存数据成功');
this.$message.success(this.$t('scriptRecord.saveDataSucess'));
this.isSavingScript=false;
this.initAutoSaveScript();
}).catch(error => {
this.$messageBox(`保存数据失败!: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.saveDataFail')}: ${error.message}`);
this.isSavingScript=false;
if (error.code === 40004 || error.code === 40005 || error.code === 40003) {
this.clearAutoSave();
@ -144,9 +148,9 @@ export default {
dumpScenesData() {
this.clearAutoSave();
const group=this.group;
this.$confirm('此操作将会清除已保存的编制数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
this.$confirm(this.$t('scriptRecord.clearDataTip'), this.$t('scriptRecord.operateTip'), {
confirmButtonText: this.$t('scriptRecord.confirmButtonText'),
cancelButtonText: this.$t('scriptRecord.cancelButtonText'),
type: 'warning'
}).then(() => {
dumpScriptData(group).then(resp => {
@ -157,9 +161,9 @@ export default {
this.$refs['addAction'].initData();
this.initAutoSaveScript();
this.$store.dispatch('scriptRecord/updateBgSet', false);
this.$message.success('重置数据成功');
this.$message.success(this.$t('scriptRecord.resetDataSuccess'));
}).catch(() => {
this.$messageBox('重置数据失败!');
this.$messageBox(this.$t('scriptRecord.resetDataFail'));
});
}).catch(() => {
this.initAutoSaveScript();

View File

@ -2,13 +2,13 @@
<el-card :style="{height: height+'px'}">
<div class="home-box">
<el-card class="box-card">
<div id="scriptTitle">创建剧本</div>
<div id="scriptTitle">{{ $t('scriptRecord.createScript') }}</div>
<div id="sciptForm">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
</div>
<div id="btnList">
<span slot="footer" class="btn-footer">
<el-button type="primary" :loading="loading" @click="doCreate"> </el-button>
<el-button type="primary" :loading="loading" @click="doCreate">{{$t('scriptRecord.submit')}}</el-button>
</span>
</div>
</el-card>
@ -40,11 +40,11 @@ export default {
computed: {
form() {
const form = {
labelWidth: '100px',
labelWidth: '150px',
items: [
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
{ prop: 'mapId', label: '所属地图', type: 'select', required: true, options: this.mapList, disabled: this.disabled},
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true}
{ prop: 'name', label: this.$t('scriptRecord.scriptName'), type: 'text', required: true},
{ prop: 'mapId', label: this.$t('scriptRecord.map'), type: 'select', required: true, options: this.mapList, disabled: this.disabled},
{ prop: 'description', label: this.$t('scriptRecord.scriptDescription'), type: 'textarea', required: true}
]
};
return form;
@ -52,15 +52,17 @@ export default {
rules() {
const crules = {
name: [
{ required: true, message: '请输入剧本名称', trigger: 'blur' },
{ required: true, message: '请输入剧本名称', trigger: 'change' }
{ required: true, message: this.$t('scriptRecord.scriptNameRule'), trigger: 'blur' },
{ required: true, message: this.$t('scriptRecord.scriptNameRule'), trigger: 'change' }
],
mapId: [
{ required: true, message: '请选择所属地图', trigger: 'change' }
],
description: [
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
{ required: true, message: '请输入剧本描述', trigger: 'change' }
{ required: true, message: this.$t('scriptRecord.scriptDescriptionRule'), trigger: 'blur' },
{ required: true, message: this.$t('scriptRecord.scriptDescriptionRule'), trigger: 'change' }
]
};
return crules;
@ -94,13 +96,15 @@ export default {
createQuest(data).then(resp => {
const data={mapId: self.formModel.mapId, scriptId: resp.data};
this.$emit('refresh', data);
this.$message.success('创建剧本成功');
this.$message.success(this.$t('scriptRecord.createScriptSuccess'));
this.formModel={};
this.loading=false;
this.$router.push({ path: `${UrlConfig.script.detail}/${resp.data}` });
}).catch(error => {
this.loading=false;
this.$messageBox(`创建剧本失败: ${error.message}`);
this.$messageBox(`${$t('scriptRecord.createScriptFail')}${error.message}`);
});
});
}

View File

@ -1,7 +1,7 @@
<template>
<el-scrollbar class="addScript" :style="{width:size.width+'px',height:size.height+'px'}" ref="elActionScrollbar" wrapClass="scrollbar-wrapper">
<el-card class="conversitionCard">
<div class="addConversition">添加对话</div>
<div class="addConversition">{{$t('scriptRecord.addConversition')}}</div>
<el-form size="mini" :model="modalData" ref="modalData" :rules="rules" label-width="100px" class="conversitionInfo" label-position="right">
<!-- <el-form-item label="动作类型" class="conditionVO" prop="actionVO.type" >
<el-select v-model="modalData.actionVO.type " placeholder="请选择动作类型" @change="changeType" :disabled="deviceTypeReadOnly||isPause">
@ -10,13 +10,13 @@
</el-form-item> -->
<div>
<div class="itemGroup">
<el-form-item label="讲述者" class="conditionVO" prop="actionVO.memberId">
<el-select v-model="modalData.actionVO.memberId" placeholder="请选择讲述者" :disabled="isPause&&isNotModify">
<el-form-item :label="$t('scriptRecord.narrator')" class="conditionVO" prop="actionVO.memberId">
<el-select v-model="modalData.actionVO.memberId" :placeholder="$t('scriptRecord.narratorRules')" :disabled="isPause&&isNotModify">
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="接收者" class="conditionVO" prop="actionVO.targetId">
<el-select v-model="modalData.actionVO.targetId" placeholder="请选择接收者" :disabled="isPause&&isNotModify">
<el-form-item :label="$t('scriptRecord.receiver')" class="conditionVO" prop="actionVO.targetId">
<el-select v-model="modalData.actionVO.targetId" :placeholder="$t('scriptRecord.receiverRules')" :disabled="isPause&&isNotModify">
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
</el-select>
</el-form-item>
@ -27,8 +27,7 @@
<div class="changeBottom"></div>
</div>
</div>
<el-form-item label="内容" class="conditionVO" prop="actionVO.reply">
<el-form-item :label="$t('scriptRecord.conversitionContent')" class="conditionVO" prop="actionVO.reply">
<el-input v-model="modalData.actionVO.reply" type="textarea" class="textareaStyle" rows="3" :disabled="isPause&&isNotModify"></el-input>
</el-form-item>
<el-form-item>
@ -37,30 +36,30 @@
</el-form>
</el-card>
<el-card class="commandCard">
<div class="addCommand">添加指令</div>
<el-form size="mini" :model="commandData" ref="commandData" :rules="commandRules" label-width="100px" class="actionInfo" label-position="right">
<el-form-item label="执行者" class="conditionVO" prop="action.memberId">
<el-select v-model="commandData.action.memberId" placeholder="请选择执行者" :disabled="isPause" @change="changeRole">
<div class="addCommand">{{$t('scriptRecord.addCommand')}}</div>
<el-form size="mini" :model="commandData" ref="commandData" :rules="commandRules" label-width="120px" class="actionInfo" label-position="right">
<el-form-item :label="$t('scriptRecord.executor')" class="conditionVO" prop="action.memberId">
<el-select v-model="commandData.action.memberId" :placeholder="$t('scriptRecord.executorRules')" :disabled="isPause" @change="changeRole">
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="执行指令" class="conditionVO" prop="action.deviceCommand">
<el-select v-model="commandData.action.deviceCommand " placeholder="请选择执行指令" @change="changeCommand" class="inputStyle" :disabled="isPause">
<el-form-item :label="$t('scriptRecord.executeCommand')" class="conditionVO" prop="action.deviceCommand">
<el-select v-model="commandData.action.deviceCommand " :placeholder="$t('scriptRecord.executeCommandRules')" @change="changeCommand" class="inputStyle" :disabled="isPause">
<el-option v-for="deviceCommand in deviceCommandList" :key="deviceCommand.deviceCommand" :label="deviceCommand.label" :value="deviceCommand.deviceCommand"></el-option>
</el-select>
</el-form-item>
<el-form-item label="起始站台" class="conditionVO" v-if="isJinLu" prop="param.startStation">
<el-select v-model="commandData.param.startStation " placeholder="请选择起始站台" class="inputStyle" :disabled="isPause">
<el-form-item :label="$t('scriptRecord.startStation')" class="conditionVO" v-if="isJinLu" prop="param.startStation">
<el-select v-model="commandData.param.startStation " :placeholder="$t('scriptRecord.startStationRules')" class="inputStyle" :disabled="isPause">
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
</el-select>
</el-form-item>
<el-form-item label="终点站台" class="conditionVO" v-if="isJinLu" prop="param.endStation">
<el-select v-model="commandData.param.endStation " placeholder="请选择终点站台" class="inputStyle" :disabled="isPause">
<el-form-item :label="$t('scriptRecord.endStation')" class="conditionVO" v-if="isJinLu" prop="param.endStation">
<el-select v-model="commandData.param.endStation " :placeholder="$t('scriptRecord.endStationRules')" class="inputStyle" :disabled="isPause">
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addCommandAction('commandData')" :disabled="isPause" :loading="adding">添加指令</el-button>
<el-button type="primary" @click="addCommandAction('commandData')" :disabled="isPause" :loading="adding">{{$t('scriptRecord.addCommandButton')}}</el-button>
</el-form-item>
</el-form>
</el-card>
@ -104,7 +103,7 @@
},
data() {
return {
buttonName:"添加对话",
buttonName:this.$t('scriptRecord.addConversitionButton'),
operateType:"add",
modalData:{
actionVO:{
@ -139,31 +138,31 @@
rules:{
actionVO:{
memberId:[
{ required: true, message: '请选择主体角色', trigger: 'change' }
{ required: true, message: this.$t('scriptRecord.narratorRules'), trigger: 'change' }
],
reply:[
{ required: true, message: '请输入内容', trigger: 'blur' }
{ required: true, message: this.$t('scriptRecord.conversitionContentRules'), trigger: 'blur' }
],
targetId:[
{ required: true, message: '请选择目标角色', trigger: 'change' }
{ required: true, message: this.$t('scriptRecord.receiverRules'), trigger: 'change' }
]
},
},
commandRules:{
action:{
memberId:[
{ required: true, message: '请选择主体角色', trigger: 'change' }
{ required: true, message: this.$t('scriptRecord.executorRules'), trigger: 'change' }
],
deviceCommand:[
{ required: true, message: '请选择执行指令', trigger: 'change' }
{ required: true, message: this.$t('scriptRecord.executeCommandRules'), trigger: 'change' }
]
},
param:{
startStation:[
{ required: true, message: '请选择起始站台', trigger: 'change' }
{ required: true, message: this.$t('scriptRecord.startStationRules'), trigger: 'change' }
],
endStation:[
{ required: true, message: '请选择终点站台', trigger: 'change' }
{ required: true, message: this.$t('scriptRecord.endStationRules'), trigger: 'change' }
]
}
}
@ -174,7 +173,7 @@
},
methods:{
initData(){
this.buttonName="添加对话";
this.buttonName=this.$t('scriptRecord.addConversitionButton');
this.operateType="add";
getScriptPlayMember(this.group).then(resp => {
let roleTypeList=ConstConfig.ConstSelect.roleType;
@ -224,14 +223,14 @@
this.adding=true;
addScriptAction(group,data).then(response=>{
this.adding=false;
this.$message.success('添加指令成功');
this.$message.success(this.$t('scriptRecord.addCommandSucess'));
this.$emit('create');
// this.$emit('create',[this.commandData.action.memberId]);
// this.$parent.$parent.$refs['addRole'].resetData([this.commandData.action.memberId]);
// this.initCommandActionData();
}).catch(error => {
this.adding=false;
this.$messageBox(`添加指令失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.addCommandFail')}: ${error.message}`);
});
}
else {
@ -252,14 +251,14 @@
{
addScriptAction(group,data).then(response=>{
this.modifying=false;
this.$message.success('添加对话成功');
this.$message.success(this.$t('scriptRecord.addConversitionSuccess'));
this.$emit('create');
// [this.modalData.actionVO.memberId]
// this.initActionData();
// this.$parent.$parent.$refs['addRole'].resetData([this.modalData.actionVO.memberId,this.modalData.actionVO.targetId]);
}).catch(error => {
this.modifying=false;
this.$messageBox(`添加对话失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.addConversitionFail')}: ${error.message}`);
});
}
else
@ -269,15 +268,15 @@
this.modifying=false;
this.isNotModify=true;
this.$emit("setDisabled",this.isNotModify);
this.buttonName="添加对话";
this.buttonName=this.$t('scriptRecord.addConversitionButton');
this.operateType="add";
this.$message.success('修改对话成功');
this.$message.success(this.$t('scriptRecord.modifyConversitionSuccess'));
this.$emit('create');
// this.$parent.$parent.$refs['addRole'].resetData([this.modalData.action.memberId,this.modalData.action.targetId]);
this.initActionData();
}).catch(error => {
this.modifying=false;
this.$messageBox(`修改对话失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.modifyConversitionFail')}: ${error.message}`);
});
}
}
@ -344,7 +343,7 @@
doShow(data){
if(data)
{
this.buttonName="修改对话";
this.buttonName=this.$t('scriptRecord.modifyConversition');
this.operateType="modify";
this.clearValidate();
this.isNotModify=false;

View File

@ -1,11 +1,11 @@
<template>
<el-card class="scriptTop">
<el-transfer v-model="selectRoleData" :data="allRoleData" class="script-player-choose" :titles="['所有角色', '演员角色']" @change="handleChange">
<el-transfer v-model="selectRoleData" :data="allRoleData" class="script-player-choose" :titles="[$t('scriptRecord.allRoles'), $t('scriptRecord.actors')]" @change="handleChange">
<span slot-scope="{option}">
<span>{{option.role+(option.name==undefined?'':option.name)}}</span>
<el-radio-group v-model="option.gender" size="mini" class="sexGroup" @change="changeSex($event,option.key)">
<el-radio-button label="Male"></el-radio-button>
<el-radio-button label="Female"></el-radio-button>
<el-radio-button label="Male">{{$t('scriptRecord.roleSexMale')}}</el-radio-button>
<el-radio-button label="Female">{{$t('scriptRecord.roleSexFemale')}}</el-radio-button>
</el-radio-group>
</span>
</el-transfer>
@ -27,7 +27,7 @@
return {
allRoleData:[],
selectRoleData:[],
sexGroup:"男",
sexGroup:this.$t('scriptRecord.roleSexMale'),
}
},
mounted(){
@ -75,11 +75,11 @@
let group=this.$props.group;
let data=movedKeys;
selectScriptMembers(group,data).then(response=>{
this.$message.success('选择剧本角色成功');
this.$message.success(this.$t('scriptRecord.selectScriptActorSuccess'));
this.$emit("refresh");
})
.catch(error => {
this.$messageBox(`选择剧本角色失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.selectScriptActorFail')}: ${error.message}`);
return false;
});
break;
@ -89,10 +89,10 @@
let data=movedKeys;
cancleScriptMembers(group,data).then(response=>{
this.$emit("refresh");
this.$message.success('取消剧本角色成功');
this.$message.success(this.$t('scriptRecord.cancleScriptActorSuccess'));
})
.catch(error => {
this.$messageBox(`取消剧本角色失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.cancleScriptActorFail')}: ${error.message}`);
this.initData();
});
}
@ -117,10 +117,10 @@
let group=this.$props.group;
let data={"gender":event};
modifyScriptMemberSex(group,id,data).then(response=>{
this.$message.success('修改剧本成员性别成功');
this.$message.success(this.$t('scriptRecord.modifyScriptActorSexSuccess'));
})
.catch(error => {
this.$messageBox(`修改剧本成员性别失败: ${error.message}`);
this.$messageBox(`${this.$t('scriptRecord.modifyScriptActorSexFail')}: ${error.message}`);
});
}
}

View File

@ -21,7 +21,7 @@
</span>
</div>
<div class="btnGroup">
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)" v-if="actionInfo.visible">修改</el-button>
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)" v-if="actionInfo.visible">{{$t('scriptRecord.modifyConversitionButton')}}</el-button>
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
</div>
</el-card>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
static/texture/msgfo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
static/texture/msgto.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB