diff --git a/src/api/company.js b/src/api/company.js index 2b4a12d1d..d7f0ce9c2 100644 --- a/src/api/company.js +++ b/src/api/company.js @@ -301,3 +301,11 @@ export function getOrgTreeById(orgId) { method: 'get' }); } +/** 查询学生在地图下仿真使用时长和实训使用时长 */ +export function getUserDuration(params) { + return request({ + url: `api/company/usage/students`, + method: 'get', + params + }); +} diff --git a/src/api/simulation.js b/src/api/simulation.js index 15147e856..b051f6e4b 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -451,6 +451,27 @@ export function getSimulationDestinationList(group) { method: 'get' }); } +/** 获取PSL盘状态 */ +export function getPslStatus(group, standCode) { + return request({ + url: `/simulation/${group}/${standCode}/psl/status`, + method: 'get' + }); +} +/** 按下IBP盘按钮 + * @param {String} button + * YXJZ-允许/禁止; + * HSJC-互锁解除; + * KM-开门; + * GM-关门; + * SD-试灯; + */ +export function pressPslButton(group, standCode, button) { + return request({ + url: `/simulation/${group}/${standCode}/psl/${button}`, + method: 'put' + }); +} /** 查询运行线或者列车经过的站台 */ export function getStandListByRunLineOrTrainCode(group, params) { return request({ diff --git a/src/assets/psl_images/green_btn.png b/src/assets/psl_images/green_btn.png new file mode 100644 index 000000000..bcb222510 Binary files /dev/null and b/src/assets/psl_images/green_btn.png differ diff --git a/src/assets/psl_images/green_off.png b/src/assets/psl_images/green_off.png new file mode 100644 index 000000000..326a55235 Binary files /dev/null and b/src/assets/psl_images/green_off.png differ diff --git a/src/assets/psl_images/green_on.png b/src/assets/psl_images/green_on.png new file mode 100644 index 000000000..582cc686a Binary files /dev/null and b/src/assets/psl_images/green_on.png differ diff --git a/src/assets/psl_images/key.png b/src/assets/psl_images/key.png new file mode 100644 index 000000000..ac7f4cf76 Binary files /dev/null and b/src/assets/psl_images/key.png differ diff --git a/src/assets/psl_images/psl_icons.js b/src/assets/psl_images/psl_icons.js new file mode 100644 index 000000000..426dbde01 --- /dev/null +++ b/src/assets/psl_images/psl_icons.js @@ -0,0 +1,22 @@ +import red_on from "@/assets/psl_images/red_on.png"; +import red_off from "@/assets/psl_images/red_off.png"; +import red_btn from "@/assets/psl_images/red_btn.png"; +import green_on from "@/assets/psl_images/green_on.png"; +import green_off from "@/assets/psl_images/green_off.png"; +import green_btn from "@/assets/psl_images/green_btn.png"; +import top_on from "@/assets/psl_images/top_on.png"; +import top_off from "@/assets/psl_images/top_off.png"; +import key from "@/assets/psl_images/key.png"; +const icons = { + red_on, + red_off, + red_btn, + green_on, + green_off, + green_btn, + top_on, + top_off, + key +}; + +export default icons; diff --git a/src/assets/psl_images/red_btn.png b/src/assets/psl_images/red_btn.png new file mode 100644 index 000000000..ce02c53df Binary files /dev/null and b/src/assets/psl_images/red_btn.png differ diff --git a/src/assets/psl_images/red_off.png b/src/assets/psl_images/red_off.png new file mode 100644 index 000000000..049e4e47d Binary files /dev/null and b/src/assets/psl_images/red_off.png differ diff --git a/src/assets/psl_images/red_on.png b/src/assets/psl_images/red_on.png new file mode 100644 index 000000000..5f8cd96c2 Binary files /dev/null and b/src/assets/psl_images/red_on.png differ diff --git a/src/assets/psl_images/top_off.png b/src/assets/psl_images/top_off.png new file mode 100644 index 000000000..8cb06b5e8 Binary files /dev/null and b/src/assets/psl_images/top_off.png differ diff --git a/src/assets/psl_images/top_on.png b/src/assets/psl_images/top_on.png new file mode 100644 index 000000000..5ee4f41c9 Binary files /dev/null and b/src/assets/psl_images/top_on.png differ diff --git a/src/jmapNew/theme/components/menus/dialog/psl.vue b/src/jmapNew/theme/components/menus/dialog/psl.vue new file mode 100644 index 000000000..53bc9494c --- /dev/null +++ b/src/jmapNew/theme/components/menus/dialog/psl.vue @@ -0,0 +1,223 @@ + + + + {{ title }} + + + + + + PSL操作指示灯 + + + + 互锁解除指示灯 + + + + + + 开门状态指示灯 + + + + 关门状态指示灯 + + + + + + 禁止 + + 允许 + + + 禁止 + + 互锁解除 + + + + + 开门按钮 + + + + 关门按钮 + + + + + + 试灯按钮 + + + + + + + + + + diff --git a/src/jmapNew/theme/xian_01/menus/menuStationStand.vue b/src/jmapNew/theme/xian_01/menus/menuStationStand.vue index 68799e87d..a12cce1e8 100644 --- a/src/jmapNew/theme/xian_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/xian_01/menus/menuStationStand.vue @@ -9,6 +9,7 @@ + @@ -22,6 +23,7 @@ import StandStopTime from './dialog/standStopTime'; import StandDetainTrainAll from './dialog/standDetainTrainAll'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; +import Psl from '@/jmapNew/theme/components/menus/dialog/psl'; import { mapGetters } from 'vuex'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; @@ -39,7 +41,8 @@ export default { StandBackStrategy, StandStopTime, StandDetainTrainAll, - SetFault + SetFault, + Psl }, props: { selected: { @@ -173,9 +176,16 @@ export default { // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; - console.log(this.menu); + if (this.$store.state.training.prdType === '01') { //角色为车站值班员 + this.menu = [ + ...this.menu, + { + label: 'PSL', + handler: this.openPsl + } + ] + } } - }, doShow(point) { this.initMenu(); @@ -295,9 +305,11 @@ export default { // 触发故障管理 triggerFaultManagement() { this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, + // 打开PSL面板 + openPsl(){ + this.$refs.psl.doShow(this.selected) } - // PSL - } }; diff --git a/src/router/index.js b/src/router/index.js index a64bba937..4cfde6cca 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -161,6 +161,7 @@ const CreateLesson = () => import('@/views/organization/draftLessonManage/create const EditLessonContent = () => import('@/views/organization/draftLessonManage/editLessonContent'); const SortLesson = () => import('@/views/organization/draftLessonManage/sortLesson'); const StudentManage = () => import('@/views/organization/classManage/studentManage/index'); +const DurationView = () => import('@/views/organization/classManage/durationView'); const GradeList = () => import('@/views/organization/examManage/gradeList'); const CreateRule = () => import('@/views/organization/ruleManage/createRule'); const TotalGrade = () => import('@/views/organization/ruleManage/totalGrade'); @@ -585,6 +586,11 @@ export const publicAsyncRoute = [ component: StudentManage, hidden: true }, + { + path: 'durationView', + component: DurationView, + hidden: true + }, { path: 'examRule/draft/:mode/:ruleId/:lessonId', component: PublishExamRuleDraft, diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 60cbfbd70..9b22616fa 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -189,6 +189,9 @@ function handle(state, data) { store.dispatch('training/over'); } break; + case 'Simulation_PslStatus': + state.simulationPslStatus = msg; + break; } } @@ -333,7 +336,8 @@ const socket = { simulationAlarmInfo: [], // 仿真报警信息 deviceStateMessages: null, // 新版订阅设备状态消息 simulationSpeed: 1, // 仿真倍速 - simulationPause: false + simulationPause: false, + simulationPslStatus: [], //PSL面板按钮状态信息 }, getters: { }, diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index aa7bf7e1b..11702c286 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 - BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线 + // BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线 // BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线 // BASE_API = 'http://192.168.3.120:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 diff --git a/src/views/organization/classManage/durationView.vue b/src/views/organization/classManage/durationView.vue new file mode 100644 index 000000000..7ef8830df --- /dev/null +++ b/src/views/organization/classManage/durationView.vue @@ -0,0 +1,170 @@ + + + {{ $route.query.className }} + 返回 + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + + + + + + + + {{ parseTime(scope.row.simulationDuration) }} + + + + + {{ parseTime(scope.row.trainingDuration) }} + + + + + + + + + + diff --git a/src/views/organization/classManage/index.vue b/src/views/organization/classManage/index.vue index 0dd44194f..37755d9f5 100644 --- a/src/views/organization/classManage/index.vue +++ b/src/views/organization/classManage/index.vue @@ -67,7 +67,7 @@ export default { { type: 'button', title: this.$t('global.operate'), - width: '350', + width: '450', buttons: [ { name: '编辑班级', @@ -87,6 +87,11 @@ export default { handleClick: this.handleGradeCheck, type: 'primary' }, + { + name: '时长查看', + handleClick: this.handleDurationView, + type: 'primary' + }, { name: '删除', handleClick: this.handleDeleteClass, @@ -139,6 +144,9 @@ export default { handleStudentDetail( index, row ) { this.$router.push({ path: '/info/studentManage', query: { classId: row.id, className: row.name, creatorId: row.creatorId} }); }, + handleDurationView(index, row) { + this.$router.push({ path: '/info/durationView', query: { classId: row.id, className: row.name } }); + }, classCreate() { this.$refs.createClass.doShow(); }