From 2db20932e118060f5c8aa54f43302fdd5e95c6b7 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Fri, 9 Aug 2019 10:10:26 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=B2=BE=E7=AE=80=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 76 ++++++--------------------------------------- 1 file changed, 10 insertions(+), 66 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 66d4e2510..70f02c994 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -31,11 +31,11 @@ export const lessonCreater = '03'; // 课程创建权限 export const admin = '04'; // 管理员 export const superAdmin = '05'; // 超级管理员 -export const userExam = '011'; // 考试系统 -export const userLesson = '012'; // 教学系统 +export const userExam = '011'; // 考试系统 +export const userLesson = '012'; // 教学系统 export const userSimulation = '013'; // 仿真系统 -export const userScreen = '014'; // 大屏系统 -export const userPlan = '015'; // 计划系统 +export const userScreen = '014'; // 大屏系统 +export const userPlan = '015'; // 计划系统 export const UrlConfig = { display: '/display', @@ -181,7 +181,6 @@ export const constantRoutes = [ redirect: '/dashboard', children: [{ path: 'dashboard', - name: 'Dashboard', component: () => import('@/views/dashboard/index'), meta: { title: '首页', icon: 'dashboard' } }] @@ -195,7 +194,6 @@ export const asyncRouter = [ path: '/', component: Layout, redirect: '/dashboard', - name: 'Dashboard', hidden: true, children: [ { @@ -208,7 +206,6 @@ export const asyncRouter = [ path: '/display/:mode', component: resolve => require(['@/views/display/index'], resolve), meta: { - title: '实训视图' }, hidden: true }, @@ -216,28 +213,23 @@ export const asyncRouter = [ path: '/trainroom', component: resolve => require(['@/views/trainRoom/index'], resolve), meta: { - title: '综合演练房间' }, hidden: true }, { path: '/jointTraining', - name: '联合演练试图', component: resolve => require(['@/views/jointTraining/index'], resolve), hidden: true }, { path: '/jlmap3d', - name: '三维test', component: resolve => require(['@/views/jlmap3d/index'], resolve), meta: { - title: '三维test' }, hidden: true }, { path: '/map', - name: '地图管理', meta: { title: '地图管理', roles: [admin, mapCreater] @@ -246,7 +238,6 @@ export const asyncRouter = [ children: [ { path: 'skinStyle', - name: '皮肤管理', component: resolve => require(['@/views/map/skinStyle/index'], resolve), meta: { title: '皮肤管理' @@ -254,11 +245,9 @@ export const asyncRouter = [ }, { path: 'skinStyle/draft/:mode/:skinStyleId', - name: '操作权限', hidden: true, component: resolve => require(['@/views/map/skinStyle/draft'], resolve), meta: { - title: '操作权限' } }, { @@ -273,7 +262,6 @@ export const asyncRouter = [ path: ':mapId/:view', component: resolve => require(['@/views/map/mapdraft/mapedit/index'], resolve), meta: { - title: '地图绘制' }, hidden: true } @@ -282,7 +270,6 @@ export const asyncRouter = [ { path: 'runPlan', redirect: '/map/runPlan/view/draft', - name: '运行图管理', component: resolve => require(['@/views/map/runplan/index'], resolve), meta: { title: '运行图管理' @@ -295,7 +282,6 @@ export const asyncRouter = [ }, { path: 'product', - name: '产品编辑', component: resolve => require(['@/views/lesson/trainingcategory/index'], resolve), meta: { title: '产品编辑' @@ -306,7 +292,6 @@ export const asyncRouter = [ { path: '/lesson', component: Layout, - name: '课程管理', meta: { title: '课程管理', roles: [admin, lessonCreater] @@ -324,7 +309,6 @@ export const asyncRouter = [ path: 'training/:trainingId/:trainingName', component: resolve => require(['@/views/lesson/trainingrecord/manage/index'], resolve), meta: { - title: '实训录制' }, hidden: true } @@ -332,7 +316,6 @@ export const asyncRouter = [ }, { path: 'manage/taskmanage', - name: '任务管理', component: resolve => require(['@/views/lesson/taskmanage/list'], resolve), meta: { title: '任务管理' @@ -340,7 +323,6 @@ export const asyncRouter = [ }, { path: 'manage/trainingRule', - name: '操作定义', component: resolve => require(['@/views/lesson/trainingRule/list'], resolve), meta: { title: '操作定义' @@ -348,16 +330,13 @@ export const asyncRouter = [ }, { path: 'manage/trainingRule/detail', - name: '操作定义明细', hidden: true, component: resolve => require(['@/views/lesson/trainingRule/detail/index'], resolve), meta: { - title: '操作定义明细' } }, { path: 'manage/training', - name: '实训管理', component: resolve => require(['@/views/lesson/trainingmanage/index'], resolve), meta: { title: '实训管理' @@ -365,7 +344,6 @@ export const asyncRouter = [ }, { path: 'edit', - name: '课程编辑', component: resolve => require(['@/views/lesson/lessoncategory/index'], resolve), meta: { title: '课程编辑' @@ -392,7 +370,6 @@ export const asyncRouter = [ { path: '/teach', redirect: '/teach/home', - name: '教学系统', component: resolve => require(['@/views/teach/index'], resolve), meta: { roles: [admin, userLesson, user] @@ -406,20 +383,18 @@ export const asyncRouter = [ } }, { + // 课程详情 path: 'detail/:lessonId', - name: '课程详情', component: resolve => require(['@/views/teach/detail/index'], resolve), meta: { - title: '课程详情' }, hidden: true }, { + // 实训详情 path: 'practical/:trainingId/:lessonId', - name: '实训详情', component: resolve => require(['@/views/teach/practical/index'], resolve), meta: { - title: '实训详情' }, hidden: true }, @@ -436,7 +411,6 @@ export const asyncRouter = [ path: '/exam', redirect: '/exam/home', component: resolve => require(['@/views/exam/index'], resolve), - name: '考试系统', meta: { roles: [admin, userExam, user] }, @@ -449,11 +423,10 @@ export const asyncRouter = [ } }, { + // 试卷详情 path: 'detail/:examId', - name: '试卷详情', component: resolve => require(['@/views/exam/detail/examDetail'], resolve), meta: { - title: '试卷详情' }, hidden: true }, @@ -465,11 +438,10 @@ export const asyncRouter = [ hidden: true }, { + // 规则管理 path: 'examRule/manage', - name: '试题设置', component: resolve => require(['@/views/publish/examRule/index'], resolve), meta: { - title: '试题设置' }, hidden: true }, @@ -478,7 +450,6 @@ export const asyncRouter = [ hidden: true, component: resolve => require(['@/views/publish/examRule/draft/index'], resolve), meta: { - title: '添加订单' } }, { @@ -489,20 +460,18 @@ export const asyncRouter = [ hidden: true }, { + // 开始考试 path: 'questionDetail/:examQuestionId', - name: '开始考试', component: resolve => require(['@/views/exam/detail/questionDetail'], resolve), meta: { - title: '开始考试' }, hidden: true }, { + // 考试结果 path: 'result/:userExamId', - name: '考试结果', component: resolve => require(['@/views/exam/result'], resolve), meta: { - title: '考试结果' }, hidden: true } @@ -512,7 +481,6 @@ export const asyncRouter = [ path: '/demonstration', redirect: '/demonstration/home', component: resolve => require(['@/views/demonstration/index'], resolve), - name: '仿真系统', meta: { roles: [admin, userSimulation, user] }, @@ -526,7 +494,6 @@ export const asyncRouter = [ }, { path: 'detail/:mapId', - name: '地图详情', component: resolve => require(['@/views/demonstration/detail/index'], resolve), meta: { title: '地图详情' @@ -546,7 +513,6 @@ export const asyncRouter = [ path: '/dp', redirect: '/dp/home', component: resolve => require(['@/views/screenMonitor/index'], resolve), - name: '大屏系统', meta: { roles: [admin, userScreen, user] }, @@ -586,7 +552,6 @@ export const asyncRouter = [ path: '/plan', redirect: '/plan/home', component: resolve => require(['@/views/planMonitor/index'], resolve), - name: '琏计划', meta: { roles: [admin, user] }, @@ -656,7 +621,6 @@ export const asyncRouter = [ }, { path: '/publish', - name: '发布内容管理', component: Layout, meta: { title: '发布内容管理', @@ -665,7 +629,6 @@ export const asyncRouter = [ children: [ { path: 'map', - name: '发布地图管理', component: resolve => require(['@/views/publish/publishMap/index'], resolve), meta: { title: '发布地图管理' @@ -673,7 +636,6 @@ export const asyncRouter = [ }, { path: 'product', - name: '产品状态管理', component: resolve => require(['@/views/publish/productStatus/index'], resolve), meta: { title: '产品状态管理' @@ -681,7 +643,6 @@ export const asyncRouter = [ }, { path: 'lesson', - name: '发布课程管理', component: resolve => require(['@/views/publish/publishLesson/index'], resolve), meta: { title: '发布课程管理' @@ -689,7 +650,6 @@ export const asyncRouter = [ }, // { // path: 'script', - // name: '仿真脚本管理', // component: resolve => require(['@/views/publish/simulationScript/index'], resolve), // meta: { // title: '仿真脚本管理', @@ -718,7 +678,6 @@ export const asyncRouter = [ }, { path: 'examRule/manage', - name: '试题管理', component: resolve => require(['@/views/publish/examRule/index'], resolve), meta: { title: '试题管理' @@ -757,7 +716,6 @@ export const asyncRouter = [ { path: '/orderauthor', component: Layout, - name: '订单权限管理', meta: { title: '订单权限管理', roles: [admin] @@ -765,7 +723,6 @@ export const asyncRouter = [ children: [ { path: 'commodity/manage', - name: '商品管理', component: resolve => require(['@/views/orderauthor/commodity/index'], resolve), meta: { title: '商品管理' @@ -773,7 +730,6 @@ export const asyncRouter = [ }, { path: 'order/manage', - name: '订单管理', component: resolve => require(['@/views/orderauthor/order/list'], resolve), meta: { title: '订单管理' @@ -781,7 +737,6 @@ export const asyncRouter = [ }, { path: 'author/manage', - name: '权限管理', component: resolve => require(['@/views/orderauthor/author/index'], resolve), meta: { title: '权限管理' @@ -789,7 +744,6 @@ export const asyncRouter = [ }, { path: 'transfer/manage', - name: '权限分发管理', component: resolve => require(['@/views/orderauthor/permission/index'], resolve), meta: { title: '权限分发管理' @@ -797,7 +751,6 @@ export const asyncRouter = [ }, { path: 'commodity/draft/:mode/:commodityId', - name: '添加商品', hidden: true, component: resolve => require(['@/views/orderauthor/commodity/draft'], resolve), meta: { @@ -806,7 +759,6 @@ export const asyncRouter = [ }, { path: 'order/draft/:mode/:orderId', - name: '添加订单', hidden: true, component: resolve => require(['@/views/orderauthor/order/draft'], resolve), meta: { @@ -815,7 +767,6 @@ export const asyncRouter = [ }, { path: 'author/draft/:mode/:userId', - name: '添加课程权限', hidden: true, component: resolve => require(['@/views/orderauthor/author/draft'], resolve), meta: { @@ -848,7 +799,6 @@ export const asyncRouter = [ children: [ { path: 'dictionary', - name: 'Dictionary', component: resolve => require(['@/views/management/dictionary/index'], resolve), meta: { title: '数据字典' @@ -856,7 +806,6 @@ export const asyncRouter = [ }, { path: 'dictionary/detail', - name: '数据字典明细', hidden: true, component: resolve => require(['@/views/management/dictionaryDetail/index'], resolve), meta: { @@ -865,7 +814,6 @@ export const asyncRouter = [ }, { path: 'userManage', - name: '用户管理', component: resolve => require(['@/views/management/userControl/index'], resolve), meta: { title: '用户管理' @@ -873,7 +821,6 @@ export const asyncRouter = [ }, { path: 'userTrainingManage', - name: '用户实训管理', component: resolve => require(['@/views/management/userTraining/index'], resolve), meta: { title: '用户实训管理' @@ -881,7 +828,6 @@ export const asyncRouter = [ }, { path: 'userExamManage', - name: '用户考试管理', component: resolve => require(['@/views/management/userExam/index'], resolve), meta: { title: '用户考试管理' @@ -889,7 +835,6 @@ export const asyncRouter = [ }, { path: 'userSimulationManage', - name: '用户仿真管理', component: resolve => require(['@/views/management/userSimulation/index'], resolve), meta: { title: '用户仿真管理' @@ -897,7 +842,6 @@ export const asyncRouter = [ }, { path: 'existingSimulation', - name: '存在仿真管理', component: resolve => require(['@/views/management/existingSimulation/index'], resolve), meta: { title: '存在仿真管理' From fe38c3dfb19d3734bbf53827986d0594b6604cb1 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 9 Aug 2019 10:33:11 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 2 +- .../display/scriptRecord/addBehavior.vue | 65 ++++++++++--------- src/views/display/scriptRecord/getAction.vue | 59 +++++++++-------- .../display/scriptRecord/getBehavior.vue | 6 +- .../scriptRecord/roleConditionScript.vue | 1 + src/views/display/tipScriptRecord.vue | 12 +--- 6 files changed, 74 insertions(+), 71 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 66d4e2510..ec8e373ce 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -377,7 +377,7 @@ export const asyncRouter = [ path: '/script', component: Layout, meta: { - roles: [admin, user] + roles: [admin, lessonCreater] }, children: [ { diff --git a/src/views/display/scriptRecord/addBehavior.vue b/src/views/display/scriptRecord/addBehavior.vue index 1c9f0888e..32a6811f4 100644 --- a/src/views/display/scriptRecord/addBehavior.vue +++ b/src/views/display/scriptRecord/addBehavior.vue @@ -46,7 +46,7 @@ import Vue from 'vue'; import DeviceTypeDic from '@/scripts/DeviceTypeDic'; import DeviceCondition from './deviceCondition'; - import {getMembersByGroup,postMemberBehavior} from '@/api/simulation'; + import {getQuestRecord,postMemberBehavior} from '@/api/simulation'; export default { name: 'addBehavior', props: { @@ -123,8 +123,8 @@ loadInitData(obj) { let group=obj.group; let memberId=this.$props.memberId; - getMembersByGroup(group).then(response=>{ - let datalist=response.data; + getQuestRecord(group).then(response=>{ + let datalist=response.data.memberVOList; this.targetMemberList=datalist; }); }, @@ -140,7 +140,7 @@ handleInputConfirm() { let inputValue = this.inputValue; if (inputValue) { - this.behavior.conditionVO.importantList.push(inputValue); + this.behavior.conditionVO.importantList.push(inputValue); } this.inputVisible = false; this.inputValue = ''; @@ -150,40 +150,49 @@ if (valid) { let group=this.$props.group; let memberId=this.$props.memberId; - if(this.behavior.conditionVO.triggerType=="DeviceCondition") + switch(this.behavior.conditionVO.triggerType) { - if(this.isAdding) + case 'DeviceCondition': { - this.behavior.conditionVO.deviceConditionList.pop(); - this.$refs.deviceCondition.resetDisabled(); + if(this.isAdding) + { + this.behavior.conditionVO.deviceConditionList.pop(); + this.$refs.deviceCondition.resetDisabled(); + } + if(this.behavior.conditionVO.deviceConditionList.length<=0) + { + this.$messageBox(`请添加设备条件`); + return; + } + break; } - if(this.behavior.conditionVO.deviceConditionList.length<=0) + case 'None': { - this.$messageBox(`请添加设备条件`); - return; + this.behavior.conditionVO={}; + this.behavior.conditionVO.triggerType="None"; + break; } } - if(this.behavior.conditionVO.triggerType=="None") - { - this.behavior.conditionVO={}; - this.behavior.conditionVO.triggerType="None"; - } if(memberId) { let behavior=this.behavior; postMemberBehavior(group,memberId,behavior).then(response=>{ - this.behavior.auto=false; - this.behavior.description=""; - this.behavior.conditionVO.triggerType="None"; - this.behavior.conditionVO.importantList=[]; - this.behavior.targetMemberId=null; - this.behavior.conditionVO.content=""; - this.behavior.conditionVO.keyWord=""; - this.behavior.id=null; + this.behavior={ + auto:false, + description:"", + conditionVO:{ + triggerType:"None", + importantList:[], + content:"", + keyWord:"", + deviceConditionList:[], + }, + targetMemberId:null, + id:null + }; this.isConversationShow=false; this.isDeviceShow=false; - this.behavior.conditionVO.deviceConditionList=[]; - if(this.$props.operateType=="add") + if(this.$props.operateType==="add") { this.$message.success('添加行为成功'); } @@ -194,7 +203,7 @@ } this.$emit('create'); }).catch(error => { - if(this.$props.operateType=="add") + if(this.$props.operateType==="add") { this.$messageBox(`添加行为失败: ${error.message}`); } @@ -236,7 +245,6 @@ case 'DeviceCondition':{ this.isConversationShow=false; this.isDeviceShow=true; - // this.$refs.deviceCondition.resetDisabled(); var newData=JSON.parse(JSON.stringify(data.conditionVO.deviceConditionList).replace(/\"code\"/g,'"isAdded":true,"code"')); this.behavior.conditionVO.deviceConditionList=newData; this.resetDisabled(); @@ -249,7 +257,6 @@ } }, resetDisabled(){ - // debugger; if(this.$refs['deviceCondition']) { this.$refs['deviceCondition'].resetDisabled(); diff --git a/src/views/display/scriptRecord/getAction.vue b/src/views/display/scriptRecord/getAction.vue index ee6b49c84..320b1b0ed 100644 --- a/src/views/display/scriptRecord/getAction.vue +++ b/src/views/display/scriptRecord/getAction.vue @@ -1,34 +1,36 @@ \ No newline at end of file +export default { + name: 'AppMain', + computed: { + } +}; + diff --git a/src/layout/components/Entry.vue b/src/layout/components/Entry.vue index 47af4fe63..b1d44f734 100644 --- a/src/layout/components/Entry.vue +++ b/src/layout/components/Entry.vue @@ -1,40 +1,37 @@ \ No newline at end of file + diff --git a/src/layout/components/Logout.vue b/src/layout/components/Logout.vue index b67076ff6..3c771d258 100644 --- a/src/layout/components/Logout.vue +++ b/src/layout/components/Logout.vue @@ -1,40 +1,40 @@ \ No newline at end of file + diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index d622071b0..b4c45a5b4 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -1,114 +1,130 @@