diff --git a/src/api/jmap/lesson.js b/src/api/jmap/lesson.js index 103c55a64..428b24770 100644 --- a/src/api/jmap/lesson.js +++ b/src/api/jmap/lesson.js @@ -111,10 +111,11 @@ export function getLessonProjectList(params) { }); } /** 获取自己发布课程列表不分页 */ -export function getLessonProjectListNoPage() { +export function getLessonProjectListNoPage(params) { return request({ url: '/api/lesson/list/byLoginProject', - method: 'get' + method: 'get', + params }); } /** 获取班级关联的自己发布的课程 */ diff --git a/src/api/management/exam.js b/src/api/management/exam.js index 8cefc50d5..0bd53c1a7 100644 --- a/src/api/management/exam.js +++ b/src/api/management/exam.js @@ -9,22 +9,6 @@ export function createExam(data) { }); } -/** 获取对应课程下类型 */ -export function getCourseTypeList(data) { - return request({ - url: `/api/exam/${data.lessonId}/trainingTypes`, - method: 'get' - }); -} - -/** 获取考试课程详情 */ -export function getCourseLessonDetail(data) { - return request({ - url: `/api/exam/${data.lessonId}/list`, - method: 'get' - }); -} - /** 获取试卷详情 */ export function getExamLessonDetail(examId) { return request({ @@ -66,17 +50,6 @@ export function setExamEffectivey(data) { }); } -/** 查询课程下类型题数 */ -export function getLessonTypeNum(data) { - return request({ - url: `/api/exam/trainingNum/${data.lessonId}/${data.trainingType}`, - method: 'get', - params: { - operateType: data.operateType - } - }); -} - /** 更新考试规则*/ export function updateExamRules(data) { return request({ diff --git a/src/iscs/iscs.js b/src/iscs/iscs.js index 0cbd893f1..c6f6a20c4 100644 --- a/src/iscs/iscs.js +++ b/src/iscs/iscs.js @@ -18,7 +18,7 @@ class Iscs { this.methods = opts.methods; // 鼠标事件 - this.events = { __Pan: 'pan', Selected: 'selected', Contextmenu: 'contextmenu', Keyboard: 'keyboard', dblclick: 'dblclick'}; + this.events = { __Pan: 'pan', Selected: 'selected', Contextmenu: 'contextmenu', Keyboard: 'keyboard', dblclick: 'dblclick', click:'click'}; // 设备数据 this.iscsDevice = {}; @@ -280,6 +280,9 @@ class Iscs { case this.events.dblclick: this.$mouseController.on(this.events.dblclick, cb, context); break; + case this.events.click: + this.$mouseController.on(this.events.click, cb, context); + break; case this.events.Contextmenu: this.$mouseController.on(this.events.Contextmenu, cb, context); break; @@ -303,6 +306,9 @@ class Iscs { case this.events.dblclick: this.$mouseController.off(this.events.dblclick, cb); break; + case this.events.click: + this.$mouseController.off(this.events.click, cb); + break; case this.events.Contextmenu: this.$mouseController.off(this.events.Contextmenu, cb); break; diff --git a/src/iscs/mouseController.js b/src/iscs/mouseController.js index 44205f387..284752c10 100644 --- a/src/iscs/mouseController.js +++ b/src/iscs/mouseController.js @@ -138,7 +138,11 @@ class MouseController extends Eventful { } click(e) { var em = this.checkEvent(e); - this.trigger(this.events.Selected, em); + if (em.deviceType == 'IscsButton') { + this.trigger(this.events.click, em); + } else { + this.trigger(this.events.Selected, em); + } } moveEvent(e) { const newEm = new EventModel(e); diff --git a/src/jmapNew/theme/parser/EqualDistanceParser.js b/src/jmapNew/theme/parser/EqualDistanceParser.js index 108484b94..d8843d719 100644 --- a/src/jmapNew/theme/parser/EqualDistanceParser.js +++ b/src/jmapNew/theme/parser/EqualDistanceParser.js @@ -7,34 +7,34 @@ const defaultConfig = { /** 间隔高度*/ multiple: 3, /** 偏移时间*/ - translation: 60 * 60 * 2, -} + translation: 60 * 60 * 2 +}; class EqualDistanceParser { - constructor() { - } + constructor() { + } - /** 加载配置*/ - load(config = defaultConfig) { - this.config = config; - this.multiple = config.multiple; - this.translation = config.translation; - this.edge = config.edge; - return this; - } + /** 加载配置*/ + load(config = defaultConfig) { + this.config = config; + this.multiple = config.multiple; + this.translation = config.translation; + this.edge = config.edge; + return this; + } - /** 解析excel数据转换为Json后台数据*/ - importData(sheet, data) { - if (this.config && + /** 解析excel数据转换为Json后台数据*/ + importData(sheet, data) { + if (this.config && this.config.importData) { - this.config.importData(sheet, data) - } else { - console.info('no import data function'); - } - } + this.config.importData(sheet, data); + } else { + console.info('no import data function'); + } + } - /** 将后台数据解析成图表*/ - convertDataToModels(data, stations, kmRangeMap, lineStyle) { + /** 将后台数据解析成图表*/ + convertDataToModels(data, stations, kmRangeMap, lineStyle) { var models = []; if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) { @@ -74,12 +74,16 @@ class EqualDistanceParser { /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; - // ${train.directionCode} - const aa = `${train.tripNumber}`; - opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeMap, lastPoint, pointdata.directionCode, true), lastPoint.stationCode, aa, '折返轨']); - opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeMap, lastPoint, pointdata.directionCode, true), lastPoint.stationCode, aa, '折返轨']); + const currentTimeList = service.tripNumberDataList[j].stationTimeList; + const nextTimeList = service.tripNumberDataList[j + 1].stationTimeList; + if (currentTimeList[currentTimeList.length - 1].secondTime != nextTimeList[0].secondTime) { + lastPoint = train.stationTimeList[idx]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; + // ${train.directionCode} + const aa = `${train.tripNumber}`; + opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeMap, lastPoint, pointdata.directionCode, true), lastPoint.stationCode, aa, '折返轨']); + opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeMap, lastPoint, pointdata.directionCode, true), lastPoint.stationCode, aa, '折返轨']); + } } /** 如果是备用车,按车次添加线*/ @@ -232,11 +236,11 @@ class EqualDistanceParser { /** 根据方向计算y折返偏移量*/ getValueYByDirectionCode(defaultValue, directionCode) { - const sign = this.getReverse() ? -1 : 1; + const sign = this.getReverse() ? -1 : 1; if (directionCode === '1') { - defaultValue -= sign*this.getEdge() / 2; + defaultValue -= sign * this.getEdge() / 2; } else if (directionCode === '2') { - defaultValue += sign*this.getEdge() / 2; + defaultValue += sign * this.getEdge() / 2; } return defaultValue; @@ -256,33 +260,33 @@ class EqualDistanceParser { return defaultValue; } - getMultiple() { - return this.config.multiple; - } + getMultiple() { + return this.config.multiple; + } - getTranslation() { - return this.config.translation - } + getTranslation() { + return this.config.translation; + } - getEdge(){ - return this.config.edge; - } + getEdge() { + return this.config.edge; + } - getReverse() { - return this.config.reverse; - } + getReverse() { + return this.config.reverse; + } - __createMartPoint(...args) { - return this.config.reverse ? createMartPointReverse(...args): createMartPoint(...args); - } + __createMartPoint(...args) { + return this.config.reverse ? createMartPointReverse(...args) : createMartPoint(...args); + } - __createSeriesModel(...args) { - return createSeriesModel(...args); - } + __createSeriesModel(...args) { + return createSeriesModel(...args); + } - __createMarkLineModels(...args) { - return createMarkLineModels(...args); - } + __createMarkLineModels(...args) { + return createMarkLineModels(...args); + } } export default EqualDistanceParser; diff --git a/src/jmapNew/theme/parser/EqualRatioParser.js b/src/jmapNew/theme/parser/EqualRatioParser.js index 662a6b7ff..443c76b89 100644 --- a/src/jmapNew/theme/parser/EqualRatioParser.js +++ b/src/jmapNew/theme/parser/EqualRatioParser.js @@ -2,40 +2,40 @@ import { createSeriesModel, createMarkLineModels, createMartPoint, createMartPoi import store from '@/store/index'; const defaultConfig = { - /** 最小时间*/ - minTime: 0, - /** 最大时间*/ - maxTime: 3600 * 24 - 1, - /** 边缘高度*/ - edge: 600, - /** 间隔高度*/ - multiple: 1, - /** 偏移时间*/ - translation: 0, -} + /** 最小时间*/ + minTime: 0, + /** 最大时间*/ + maxTime: 3600 * 24 - 1, + /** 边缘高度*/ + edge: 600, + /** 间隔高度*/ + multiple: 1, + /** 偏移时间*/ + translation: 0 +}; class EqualRatioParser { - constructor() { - } + constructor() { + } - /** 加载配置*/ - load(config = defaultConfig) { - this.config = config; - return this; - } + /** 加载配置*/ + load(config = defaultConfig) { + this.config = config; + return this; + } - /** 解析excel数据转换为Json后台数据*/ - importData(sheet, data) { - if (this.config && + /** 解析excel数据转换为Json后台数据*/ + importData(sheet, data) { + if (this.config && this.config.importData) { - this.config.importData(sheet, data) - } else { - console.info('no import data function'); - } - } + this.config.importData(sheet, data); + } else { + console.info('no import data function'); + } + } - /** 将后台数据解析成图表*/ - convertDataToModels(data, stations, kmRangeMap, lineStyle) { + /** 将后台数据解析成图表*/ + convertDataToModels(data, stations, kmRangeMap, lineStyle) { var models = []; if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) { /** 按服务遍历数据*/ @@ -74,19 +74,23 @@ class EqualRatioParser { // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || // index > 0 && index < train.stationTimeList.length - 1) { - const aa = `${train.tripNumber}`; - opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]); + const aa = `${train.tripNumber}`; + opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]); // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; - num = this.computedReentryNumber(train.tripNumber); - const aa = `${train.tripNumber}`; - opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, aa]); - opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode, aa]); + const currentTimeList = service.tripNumberDataList[j].stationTimeList; + const nextTimeList = service.tripNumberDataList[j + 1].stationTimeList; + if (currentTimeList[currentTimeList.length - 1].secondTime != nextTimeList[0].secondTime) { + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; + num = this.computedReentryNumber(train.tripNumber); + const aa = `${train.tripNumber}`; + opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, aa]); + opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode, aa]); + } } /** 如果是备用车,按车次添加线*/ @@ -246,7 +250,7 @@ class EqualRatioParser { /** 根据方向计算y折返偏移量*/ getValueYByDirectionCode(defaultValue, directionCode, num) { - const sign = this.getReverse() ? -1 : 1; + const sign = this.getReverse() ? -1 : 1; if (directionCode === '1') { defaultValue -= sign * this.getEdge() / 2 * num; } else if (directionCode === '2') { @@ -270,33 +274,33 @@ class EqualRatioParser { return defaultValue; } - getMultiple() { - return this.config.multiple; - } + getMultiple() { + return this.config.multiple; + } - getTranslation() { - return this.config.translation - } + getTranslation() { + return this.config.translation; + } - getEdge(){ - return this.config.edge; - } + getEdge() { + return this.config.edge; + } - getReverse() { - return this.config.reverse; - } + getReverse() { + return this.config.reverse; + } - __createMartPoint(...args) { - return this.config.reverse ? createMartPointReverse(...args): createMartPoint(...args); - } + __createMartPoint(...args) { + return this.config.reverse ? createMartPointReverse(...args) : createMartPoint(...args); + } - __createSeriesModel(...args) { - return createSeriesModel(...args); - } + __createSeriesModel(...args) { + return createSeriesModel(...args); + } - __createMarkLineModels(...args) { - return createMarkLineModels(...args); - } + __createMarkLineModels(...args) { + return createMarkLineModels(...args); + } } export default EqualRatioParser; diff --git a/src/views/exam/index.vue b/src/views/exam/index.vue index daee2797b..f929472ee 100644 --- a/src/views/exam/index.vue +++ b/src/views/exam/index.vue @@ -6,7 +6,12 @@ - + +
试卷名称:
+ + 查找 +
+