-
-
城市轨道交通实训平台
+
+
+
{{systemTitle}}
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
new file mode 100644
index 000000000..96c672d2e
--- /dev/null
+++ b/src/views/designPlatform/demonList.vue
@@ -0,0 +1,180 @@
+
+
+
+
+ 已发布地图列表
+
+
+
+
+
+
+ {{ tnode.label }}
+
+
+
+
+
+
+
+ 我的地图列表
+
+
+
+
+
+
+ {{ tnode.label }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/designPlatform/home.vue b/src/views/designPlatform/home.vue
index 61c7765cb..b73cbfa7e 100644
--- a/src/views/designPlatform/home.vue
+++ b/src/views/designPlatform/home.vue
@@ -1,3 +1,97 @@
-
-
\ No newline at end of file
+
+
+
+
+ 城市轨道交通设计平台
+
+
+
+
+
+
+
+
+
+ {{ $t('demonstration.simulationSystemDescription') }}
+
+
+
+
+
+
+
diff --git a/src/views/designPlatform/index.vue b/src/views/designPlatform/index.vue
new file mode 100644
index 000000000..c46899706
--- /dev/null
+++ b/src/views/designPlatform/index.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
diff --git a/src/views/login/loginDesign.vue b/src/views/login/loginDesign.vue
index 01c129a1c..fe64aaec4 100644
--- a/src/views/login/loginDesign.vue
+++ b/src/views/login/loginDesign.vue
@@ -114,7 +114,7 @@ export default {
// 设置路由
this.loading = false;
this.tipsMsg = '';
- this.$router.push({ path: `${UrlConfig.design.prefix}/home` });
+ this.$router.push({ path: `${UrlConfig.design.prefix}` });
}).catch(error => {
this.tipsMsg = error.message;
this.loading = false;
diff --git a/src/views/trainingPlatform/index.vue b/src/views/trainingPlatform/index.vue
index adc03aa4c..0797befef 100644
--- a/src/views/trainingPlatform/index.vue
+++ b/src/views/trainingPlatform/index.vue
@@ -21,7 +21,7 @@
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
export default {
- name: 'Exam',
+ name: 'TrainingPlatform',
components: {
demonList,
drapLeft
@@ -80,7 +80,6 @@
}
.examList {
- /*float: left;*/
position: fixed;
top: 61px;
height: 100%;
From 37dd77bc55f03fbda219b6a7411b890682bf94dd Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Wed, 25 Sep 2019 15:32:44 +0800
Subject: [PATCH 020/179] =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=8B=96=E6=8B=BD?=
=?UTF-8?q?=E5=B0=BA=E5=AF=B8=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/components/drapUp/index.vue | 9 +++++++--
src/views/designPlatform/demonList.vue | 16 +++++-----------
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/views/components/drapUp/index.vue b/src/views/components/drapUp/index.vue
index 7afd00a79..1bcd9cf2a 100644
--- a/src/views/components/drapUp/index.vue
+++ b/src/views/components/drapUp/index.vue
@@ -2,7 +2,7 @@
@@ -43,6 +43,11 @@ export default {
heightUps: 0
};
},
+ computed: {
+ heightTotol() {
+ return this.$store.state.app.height - 50;
+ },
+ },
mounted() {
const oDiv = this.$refs.drapBox;
oDiv.onmousedown = () => {
@@ -52,7 +57,7 @@ export default {
methods: {
mousedown(e) {
const oDiv = this.$refs.drapBox;
- const maxNum = this.max || 850;
+ const maxNum = this.max || this.heightTotol-200;
const minNum = this.min || 150;
oDiv.onmousedown = function() {
return false;
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index 96c672d2e..562fcf229 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -1,12 +1,9 @@
-
-
- 已发布地图列表
-
+
-
+
-
-
- 我的地图列表
-
+
-
+
Date: Wed, 25 Sep 2019 15:34:29 +0800
Subject: [PATCH 021/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/designPlatform/demonList.vue | 40 +++++++++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index 96c672d2e..5033c305b 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -132,14 +132,52 @@
}
},
clickEvent(obj, data, ele) {
-
+ if (data.parent && data.parent.data){
+ this.mapId = data.parent.data.id;
+ }
+ switch(obj.type){
+ case 'scriptDesign':{
+ // this.$router.push({ path: `${UrlConfig.trainingPlatform.prodDetail}/${this.mapId}/${obj.id}` });
+ break;
+ }
+ }
},
async refresh(filterSelect) {
this.loading = true;
this.treeData = this.treeList = [];
try {
const res = await getPublishMapTree(filterSelect);
+
+ res.data.forEach(elem=>{
+ if(elem.children)
+ {
+ elem.children=[
+ {
+ id:'1',
+ name:'地图设计',
+ type:'mapDesign'
+ },
+ {
+ id:'2',
+ name:'课程设计',
+ type:'lessonDesign'
+ },
+ {
+ id:'3',
+ name:'剧本设计',
+ type:'scriptDesign'
+ },
+ {
+ id:'4',
+ name:'运行图设计',
+ type:'runPlanDesign'
+ },
+ ]
+ }
+ });
+
this.treeData = res.data;
+
this.treeList = this.filterText
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
: res.data;
From 0fac6ce22e5a0766e3196ddde93009159e842611 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Wed, 25 Sep 2019 18:56:30 +0800
Subject: [PATCH 022/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/permission.js | 2 +-
src/router/index.js | 22 +++++++-
src/views/components/drapUp/index.vue | 4 +-
src/views/designPlatform/demonList.vue | 22 +++++++-
src/views/lesson/lessoncategory/index.vue | 24 ++++----
src/views/map/mapdraft/mapedit/index.vue | 69 ++++++++++++++++++++++-
6 files changed, 122 insertions(+), 21 deletions(-)
diff --git a/src/permission.js b/src/permission.js
index d358dbf3a..cf0a42dc8 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -38,7 +38,7 @@ function getRouteInfo(to) {
clientId = LoginParams.DaPing.clientId;
} else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath) || /^\/planEdit/.test(toRoutePath)) {
loginPath = loginPlanPage;
- getTokenInfo = getPlanToken;
+ getTokenInfo = getToken;
clientId = LoginParams.LianJiHua.clientId;
} else if (/^\/design/.test(toRoutePath)) {
loginPath = loginDesignPage;
diff --git a/src/router/index.js b/src/router/index.js
index 6a07571ab..0d70def51 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -199,10 +199,13 @@ export const UrlConfig = {
pay: '/plan/pay'
},
design: {
- prefix: '/design'
+ prefix: '/design',
// tool: '/design/tool',
// detail: '/plan/detail',
// pay: '/plan/pay'
+ mapDraw: '/design/map/draw',
+ lessonEdit: '/design/lesson/edit',
+ runPlan: '/design/runPlan/detail'
},
replay: {
prefix: '/replay'
@@ -384,6 +387,23 @@ export const asyncRouter = [
meta: {
},
hidden: true
+ },
+ {
+ path: 'map/draw/:mapId/:view',
+ component: Mapedit,
+ hidden: true
+ },
+ {
+ path: 'lesson/edit',
+ component: Lessoncategory,
+ meta: {
+ },
+ hidden: true
+ },
+ {
+ path: 'runPlan/detail/:lessonId',
+ component: PlanMonitorDetail,
+ hidden: true
}
]
}
diff --git a/src/views/components/drapUp/index.vue b/src/views/components/drapUp/index.vue
index 1bcd9cf2a..7fb219cc9 100644
--- a/src/views/components/drapUp/index.vue
+++ b/src/views/components/drapUp/index.vue
@@ -66,7 +66,6 @@ export default {
window.event.cancelBubble = true;
const odiv = e.target;
const disY = e.clientY - odiv.offsetTop ;
- console.log(e.clientY,odiv.offsetHeight,odiv.offsetTop);
document.onmousemove = (e) => {
let top = e.clientY - disY;
if (top > maxNum) {
@@ -77,11 +76,10 @@ export default {
odiv.style.top = top + 'px';
this.$emit('drapHeight', top);
this.heightUps = top;
- console.log(top,'====');
};
document.onmouseup = (e) => {
if (this.isSave) {
- if (this.heightUps > minNum) { // 左侧菜单宽度必须大于150 才可以设置
+ if (this.heightUps > minNum) {
localStore('upHeight', JSON.stringify(this.heightUps));
}
}
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index 3473c9686..17b91436d 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -134,6 +134,18 @@
// this.$router.push({ path: `${UrlConfig.trainingPlatform.prodDetail}/${this.mapId}/${obj.id}` });
break;
}
+ case 'mapDesign': {
+ this.resize();
+ this.$router.push({ path: `${UrlConfig.design.mapDraw}/0/draft`, query: { name: '' } });
+ break;
+ }
+ case 'lessonDesign': {
+ this.$router.push({ path: `${UrlConfig.design.lessonEdit}` });
+ break;
+ }
+ case 'runPlanDesign': {
+ this.$router.push({ path: `${UrlConfig.design.runPlan}/14` })
+ }
}
},
async refresh(filterSelect) {
@@ -141,7 +153,7 @@
this.treeData = this.treeList = [];
try {
const res = await getPublishMapTree(filterSelect);
-
+
res.data.forEach(elem=>{
if(elem.children)
{
@@ -171,7 +183,7 @@
});
this.treeData = res.data;
-
+
this.treeList = this.filterText
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
: res.data;
@@ -187,6 +199,12 @@
},
drapHeight(height) {
this.heightUp = Number(height);
+ },
+ resize() {
+ 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 });
}
}
};
diff --git a/src/views/lesson/lessoncategory/index.vue b/src/views/lesson/lessoncategory/index.vue
index ea604fb71..e96406ebe 100644
--- a/src/views/lesson/lessoncategory/index.vue
+++ b/src/views/lesson/lessoncategory/index.vue
@@ -1,17 +1,17 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/map/mapdraft/mapedit/index.vue b/src/views/map/mapdraft/mapedit/index.vue
index a2e3e3c1c..646852b67 100644
--- a/src/views/map/mapdraft/mapedit/index.vue
+++ b/src/views/map/mapdraft/mapedit/index.vue
@@ -4,7 +4,19 @@
+
+
{{ $t('map.newConstruction') }}
+
+
+ {{ $t('map.importMap') }}
+
{
+ const obj = this.$refs.files;
+ if (!obj.files) return;
+ const f = obj.files[0];
+ const reader = new FileReader();
+ const that = this;
+ reader.readAsText(f, 'utf-8');
+ reader.onload = function(e) {
+ const data = e.target.result;
+ postBuildMapImport(JSON.parse(data)).then(res => {
+ loading.close();
+ that.$message.success('导入成功!');
+ that.refresh();
+ loading.close();
+ }).catch(error => {
+ loading.close();
+ that.$message.error('导入失败' + error.message);
+ });
+ obj.value = '';
+ };
+ });
+ }
}
};
@@ -345,4 +391,23 @@ export default {
margin-right: 12px;
}
}
+
+ .uploadDemo {
+ position: relative;
+ overflow: hidden;
+ float: right;
+ padding: 3px 0;
+ margin-right: 3px;
+ cursor: pointer;
+
+ input {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+ opacity: 0;
+ cursor: pointer;
+ }
+ }
From bde4904b2a978f84bad5222af658fc46af3389c9 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Thu, 26 Sep 2019 09:07:19 +0800
Subject: [PATCH 023/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/store/modules/user.js | 1 +
src/views/designPlatform/demonList.vue | 2 +-
src/views/scriptManage/home.vue | 222 +++++++++++++++++--------
3 files changed, 152 insertions(+), 73 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 153447e8f..923a656ac 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -128,6 +128,7 @@ const user = {
// 获取用户信息
GetInfo({ commit }, getTokenInfo) {
return new Promise((resolve, reject) => {
+ debugger;
getInfo(getTokenInfo()).then(response => {
const user = response.data;
if (user.roles && user.roles.length > 0) { // 验证返回的roles是否是一个非空数组
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index 17b91436d..a22b761a2 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -131,7 +131,7 @@
}
switch(obj.type){
case 'scriptDesign':{
- // this.$router.push({ path: `${UrlConfig.trainingPlatform.prodDetail}/${this.mapId}/${obj.id}` });
+ this.$router.push({ path: `${UrlConfig.design.scriptHome}/${this.mapId}` });
break;
}
case 'mapDesign': {
diff --git a/src/views/scriptManage/home.vue b/src/views/scriptManage/home.vue
index d75cc3194..bb68c192d 100644
--- a/src/views/scriptManage/home.vue
+++ b/src/views/scriptManage/home.vue
@@ -1,6 +1,39 @@
-
+
+
+
+
+
+
+
+
+
+ {{$t('scriptRecord.scriptRecord')}}
+ {{$t('scriptRecord.scriptModify')}}
+ {{$t('scriptRecord.scriptDelete')}}
+
+
+
+
+
From 0bb8e6ba0b3433cf42ffe7eb609c34a08ab01020 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Thu, 26 Sep 2019 10:54:07 +0800
Subject: [PATCH 024/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96?=
=?UTF-8?q?=E5=89=A7=E6=9C=AC=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/i18n/langs/en/scriptRecord.js | 2 +
src/i18n/langs/zh/scriptRecord.js | 2 +
src/views/scriptManage/create.vue | 109 ++++++++++++++++++++++++
src/views/scriptManage/home.vue | 135 +++++++++++++++---------------
4 files changed, 181 insertions(+), 67 deletions(-)
create mode 100644 src/views/scriptManage/create.vue
diff --git a/src/i18n/langs/en/scriptRecord.js b/src/i18n/langs/en/scriptRecord.js
index 3fdc4ac8f..821b62ff3 100644
--- a/src/i18n/langs/en/scriptRecord.js
+++ b/src/i18n/langs/en/scriptRecord.js
@@ -4,6 +4,7 @@ export default {
saveData: 'Save Data',
mapList: 'Map List',
createScript: 'Create Script',
+ modifyScript: 'Modify Script',
scriptName: 'Script Name',
addScript: 'Add Script',
map: 'Map',
@@ -15,6 +16,7 @@ export default {
createScriptFail: 'Create script failure',
scriptDetail: 'Script Detail',
scriptRecord: 'Record',
+ scriptCreate: 'Create',
scriptModify: 'Modify',
scriptDelete: 'Delete',
getScriptFail: 'Get script information failure',
diff --git a/src/i18n/langs/zh/scriptRecord.js b/src/i18n/langs/zh/scriptRecord.js
index 779167574..dfeaa3806 100644
--- a/src/i18n/langs/zh/scriptRecord.js
+++ b/src/i18n/langs/zh/scriptRecord.js
@@ -4,6 +4,7 @@ export default {
saveData: '保存数据',
mapList: '地图列表',
createScript: '创建剧本',
+ modifyScript: '修改剧本',
scriptName: '剧本名称',
addScript: '添加剧本',
map: '所属地图',
@@ -15,6 +16,7 @@ export default {
createScriptFail: '创建剧本失败',
scriptDetail: '剧本详情',
scriptRecord: '编制',
+ scriptCreate: '创建',
scriptModify: '修改',
scriptDelete: '删除',
getScriptFail: '获取剧本信息失败',
diff --git a/src/views/scriptManage/create.vue b/src/views/scriptManage/create.vue
new file mode 100644
index 000000000..28aa975c2
--- /dev/null
+++ b/src/views/scriptManage/create.vue
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/scriptManage/home.vue b/src/views/scriptManage/home.vue
index bb68c192d..a6819aecb 100644
--- a/src/views/scriptManage/home.vue
+++ b/src/views/scriptManage/home.vue
@@ -1,6 +1,6 @@
-
+ {{$t('scriptRecord.scriptCreate')}}
- {{$t('scriptRecord.scriptRecord')}}
- {{$t('scriptRecord.scriptModify')}}
- {{$t('scriptRecord.scriptDelete')}}
+
+ {{$t('scriptRecord.scriptRecord')}}
+ {{$t('scriptRecord.scriptModify')}}
+ {{$t('scriptRecord.scriptDelete')}}
+
-
+
-
+
+
+
+
+ {{ $t('map.importMap') }}
+
+ {{ $t('map.newConstruction') }}
+
+
@@ -218,6 +290,31 @@
color: #3ea726;
}
}
+
+ .buttonList{
+ padding: 8px 0px 8px 0px;
+ border-top: 1px #ccc solid;
+ }
+ .eachButton{
+ margin-left:10px;
+ }
+ .uploadDemo {
+ position: relative;
+ overflow: hidden;
+ // float: right;
+ padding: 9px 15px;
+ margin-right: 3px;
+ cursor: pointer;
+ input {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+ opacity: 0;
+ cursor: pointer;
+ }
+ }
From 9d41af74bdbc63b1ded897de8624b5edf329c07b Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Thu, 26 Sep 2019 17:46:27 +0800
Subject: [PATCH 031/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96=20?=
=?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=9C=B0=E5=9B=BE=E6=8C=89=E9=92=AE=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/designPlatform/demonList.vue | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index 7d56a7892..d448da333 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -32,9 +32,11 @@
accept=".json, application/json"
@change="importf"
>
- {{ $t('map.importMap') }}
+
+ 导入地图
-
{{ $t('map.newConstruction') }}
+
新建地图
+
-
{{ $t('map.newConstruction') }}
-
+
新建地图
+
From 58b429f8529412c9121532d4eca586cde08477a5 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Fri, 27 Sep 2019 10:16:11 +0800
Subject: [PATCH 032/179] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E8=AE=BE=E8=AE=A1?=
=?UTF-8?q?=E5=8F=B3=E9=94=AE=E6=93=8D=E4=BD=9C=E6=B7=BB=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/designPlatform/demonList.vue | 44 ++++++++++++++++++-
src/views/designPlatform/index.vue | 1 -
.../lesson/trainingrecord/manage/index.vue | 6 ++-
3 files changed, 47 insertions(+), 4 deletions(-)
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index d448da333..d0359508d 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -55,7 +55,7 @@
-
+
新建地图
+
diff --git a/src/views/teach/detail/index.vue b/src/views/teach/detail/index.vue
index b127df2a5..fd8a317a9 100644
--- a/src/views/teach/detail/index.vue
+++ b/src/views/teach/detail/index.vue
@@ -13,33 +13,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ node.label +'(免费)'}}
+ {{ node.label }}
{{ node.label }}
@@ -64,10 +52,12 @@
diff --git a/src/views/teach/detail/index.vue b/src/views/teach/detail/index.vue
index fd8a317a9..36dac7a61 100644
--- a/src/views/teach/detail/index.vue
+++ b/src/views/teach/detail/index.vue
@@ -123,10 +123,10 @@ export default {
treeList: response.data.treeNodeList,
PermissionType: PermissionType.LESSON
};
- this.getExpandList();
+ this.getExpandList(this.courseModel.id);
this.$nextTick(() => {
- const checkId = getSessionStorage('trainingTeachCheckId') || null;
- this.$refs.tree.setCurrentKey(checkId);
+ const checkId = getSessionStorage('trainingTeachCheckId'+this.courseModel.id) || null;
+ this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
this.loading = false;
});
}).catch(error => {
@@ -134,13 +134,6 @@ export default {
});
}
},
- buy(query) {
- this.loading = true;
- this.$router.push({
- path: `${UrlConfig.trainingPlatform.pay}/${query.lessonId}`,
- query: { permissionType: PermissionType.LESSON, lessonId: query.lessonId, prdCode: query.prdCode, mapId: query.mapId }
- });
- },
transfer() {
this.loading = false;
if (this.$refs) {
@@ -156,7 +149,7 @@ export default {
}
},
clickEvent(obj, node, ele) {
- setSessionStorage('trainingTeachCheckId', obj.id);
+ setSessionStorage('trainingTeachCheckId'+this.courseModel.prdCode, obj.id);
if (obj && obj.type==='training') {
if (obj.valid) {
this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${obj.id}/${node.id}`});
@@ -165,22 +158,7 @@ export default {
confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('tip.cancel')
}).then(() => {
- debugger;
- while (node) {
- if (node.data.type === 'lesson') {
- const lessonId = node.data.id;
- if (lessonId) {
- const query = {
- lessonId: lessonId,
- prdCode: this.courseModel.prdCode,
- mapId: this.courseModel.mapId
- };
- this.buy(query);
- }
- break;
- }
- node = node.parent;
- }
+ this.buy();
}).catch(() => { });
}
}
@@ -189,28 +167,29 @@ export default {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
- lessonDetail(data) {
- this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${data.id}` });
- },
- buy(data) {
+ buy() {
this.$router.push({
- path: `${UrlConfig.trainingPlatform.pay}/${data.lessonId}`, query:
- { permissionType: PermissionType.LESSON, lessonId: data.lessonId, prdCode: data.prdCode, mapId: data.mapId }
+ path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query:
+ { permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId }
});
},
nodeExpand(obj, node, ele) {
const key = obj.id;
this.expandList = this.expandList.filter(item => item!==key);
this.expandList.push(key);
- setSessionStorage('trainingTeachExpandList',this.expandList)
+ setSessionStorage('trainingTeachExpandList'+this.courseModel.id,this.expandList)
},
nodeCollapse(obj, node, ele) {
const key = obj.id;
- this.expandList = this.expandList.filter(item => item!==key);
- setSessionStorage('trainingTeachExpandList',this.expandList)
+ if (type === 'lesson'){
+ this.expandList = [];
+ }else {
+ this.expandList = this.expandList.filter(item => item!==key);
+ }
+ setSessionStorage('trainingTeachExpandList'+this.courseModel.id,this.expandList)
},
- getExpandList() {
- let expand = getSessionStorage('trainingTeachExpandList');
+ getExpandList(id) {
+ let expand = getSessionStorage('trainingTeachExpandList'+id);
expand = expand?(expand+'').split(','):'';
if (expand instanceof Array){
this.expandList = expand;
diff --git a/src/views/trainRoom/index.vue b/src/views/trainRoom/index.vue
index de4fa5850..a16a1b38f 100644
--- a/src/views/trainRoom/index.vue
+++ b/src/views/trainRoom/index.vue
@@ -425,7 +425,7 @@ export default {
};
console.log('data',data);
if (data.state == '03') { // 房间销毁
- this.$router.push({ path: `/trainingPlatform/detail/${param.mapId}/${this.prodId}` });
+ this.$router.push({ path: `/trainingPlatform/detail/${this.mapId}`, query: {prodId:this.prodId, type: '仿真系统'}});
} else if (data.state == '01') { // 进入准备中
this.starting = false;
} else if (data.state == '02') {
@@ -685,7 +685,7 @@ export default {
this.loading = true;
await putJointTrainingExit(this.$route.query.group);
this.loading = false;
- this.$router.push({ path: `/trainingPlatform/detail/${this.mapId}/${this.prodId}` });
+ this.$router.push({ path: `/trainingPlatform/detail/${this.mapId}`, query: {prodId:this.prodId, type: '仿真系统'}});
} catch (error) {
this.messageInfo( this.$t('error.operationFailure'), 'error');
}
diff --git a/src/views/trainingPlatform/demonList.vue b/src/views/trainingPlatform/demonList.vue
index 2388cc855..8c0834865 100644
--- a/src/views/trainingPlatform/demonList.vue
+++ b/src/views/trainingPlatform/demonList.vue
@@ -36,6 +36,7 @@
import { UrlConfig } from '@/router/index';
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
import FilterCity from '@/views/components/filterCity';
+ import localStore from 'storejs';
export default {
name: 'DemonList',
@@ -64,7 +65,8 @@
node: {
},
mapId: '',
- expandList: []
+ expandList: [],
+ filterSelect: ''
};
},
watch: {
@@ -90,7 +92,7 @@
}
},
clickEvent(obj, data, ele) {
- setSessionStorage('trainIngPlatformCheckId', obj.id);
+ setSessionStorage('trainingPlatformCheckId'+this.filterSelect, obj.id);
while (data) {
if (data.data.type === 'map') {
this.mapId = data.data.id;
@@ -108,20 +110,22 @@
} else if ( obj.type === '考试系统' ){
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.mapId}`, query: { prodId: obj.code, type: obj.type }});
}
+ localStore.set('trainingPlatformRoute',this.$router.history.current.fullPath);
},
async refresh(filterSelect) {
this.loading = true;
this.treeData = this.treeList = [];
+ this.filterSelect = filterSelect;
try {
const res = await getTrainingSystemList({cityCode:filterSelect});
this.treeData = res.data;
this.treeList = this.filterText
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
: res.data;
- this.getExpandList();
+ this.getExpandList(filterSelect);
this.$nextTick(() => {
- const checkId = getSessionStorage('trainingPlatformCheckId') || null;
- this.$refs.tree.setCurrentKey(checkId);
+ const checkId = getSessionStorage('trainingPlatformCheckId'+filterSelect) || null;
+ this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
this.loading = false;
});
} catch (error) {
@@ -133,15 +137,15 @@
const key = obj.id;
this.expandList = this.expandList.filter(item => item!==key);
this.expandList.push(key);
- setSessionStorage('trainIngPlatformExpandList',this.expandList)
+ setSessionStorage('trainIngPlatformExpandList'+this.filterSelect,this.expandList)
},
nodeCollapse(obj, node, ele) {
const key = obj.id;
this.expandList = this.expandList.filter(item => item!==key);
- setSessionStorage('trainIngPlatformExpandList',this.expandList)
+ setSessionStorage('trainIngPlatformExpandList'+this.filterSelect,this.expandList)
},
- getExpandList() {
- let expand = getSessionStorage('trainIngPlatformExpandList');
+ getExpandList(filterSelect) {
+ let expand = getSessionStorage('trainIngPlatformExpandList'+filterSelect);
expand = expand?(expand+'').split(','):'';
if (expand instanceof Array){
this.expandList = expand;
From 1e95cae5e5379f6cfe4f46a9fee9b7f0a5960788 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Fri, 27 Sep 2019 18:16:27 +0800
Subject: [PATCH 036/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96=20?=
=?UTF-8?q?=E8=AE=BE=E8=AE=A1=E7=B3=BB=E7=BB=9F=E7=95=8C=E9=9D=A2=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/management/mapprd.js | 9 ++
src/i18n/langs/en/router.js | 2 +
src/i18n/langs/zh/router.js | 2 +
src/router/index.js | 36 ++++-
src/views/components/filterCity/index.vue | 1 +
src/views/designPlatform/demonList.vue | 189 ++++++++--------------
6 files changed, 114 insertions(+), 125 deletions(-)
diff --git a/src/api/management/mapprd.js b/src/api/management/mapprd.js
index 384e5759c..80eef4871 100644
--- a/src/api/management/mapprd.js
+++ b/src/api/management/mapprd.js
@@ -8,6 +8,15 @@ export function getPublishMapTree(cityCode) {
});
}
+/** 获取用户地图树 */
+export function getUserMapTree(cityCode) {
+ return request({
+ url: `/api/mapSystem/findDraftMapByCityCode?cityCode=${cityCode}`,
+ method: 'get'
+ });
+ // api//?cityCode=350100
+}
+
/** 获取产品详细内容*/
export function getProductDetail(prdCode) {
return request({
diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js
index 46fcf8efe..783551fdb 100644
--- a/src/i18n/langs/en/router.js
+++ b/src/i18n/langs/en/router.js
@@ -7,6 +7,8 @@ export default {
runPlanManage: 'Run plan',
productEdit: 'Product editor',
+ designhomePage: 'Public map',
+
lessaonManage: 'Lesson',
lessonEdit: 'Lesson editor',
trainingRecord: 'Trainning recording',
diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js
index 5270ff627..c9e522725 100644
--- a/src/i18n/langs/zh/router.js
+++ b/src/i18n/langs/zh/router.js
@@ -1,6 +1,8 @@
export default {
homePage: '首页',
+ designhomePage: '公共地图',
+
mapManage: '地图管理',
skinManage: '皮肤管理',
mapDraw: '地图绘制',
diff --git a/src/router/index.js b/src/router/index.js
index 907ec932b..254a7e70f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -40,11 +40,11 @@ import LessonHome from '@/views/lesson/home';
import LessonManage from '@/views/lesson/index';
// import Scriptmanage from '@/views/lesson/scriptmanage/list';
-import Scriptmanage from '@/views/scriptManage/index';
+// import Scriptmanage from '@/views/scriptManage/index';
import ScriptmanageHome from '@/views/scriptManage/home';
import ScriptDisplay from '@/views/scriptManage/display/index';
-import ScriptDetail from '@/views/scriptManage/detail/index';
+// import ScriptDetail from '@/views/scriptManage/detail/index';
import Teach from '@/views/teach/index';
import TeachHome from '@/views/teach/home';
import TeachDetail from '@/views/teach/detail/index';
@@ -372,10 +372,35 @@ export const asyncRouter = [
// // }
// // ]
// },
+ // {
+ // path: '/design',
+ // component: Layout,
+ // meta: {
+ // roles: [admin, user, userDesign]
+ // },
+ // children: [
+ // {
+ // path: '',
+ // redirect: '/design/home',
+ // component: DesignPlatform,
+ // meta: {
+ // i18n: 'router.designhomePage',
+ // icon: 'design'
+ // },
+ // children: [
+ // {
+ // path: 'home',
+ // component: DesignPlatformHome,
+ // meta: {
+ // }
+ // }
+ // ]
+ // }
+ // ]
+ // },
{
path: '/design',
component: Layout,
- hidden: true,
meta: {
roles: [admin, user, userDesign]
},
@@ -385,6 +410,8 @@ export const asyncRouter = [
redirect: '/design/home',
component: DesignPlatform,
meta: {
+ i18n: 'router.designhomePage',
+ icon: 'design'
},
children: [
{
@@ -414,7 +441,8 @@ export const asyncRouter = [
component: ScriptmanageHome,
meta: {
i18n: 'router.scriptManage'
- }
+ },
+ hidden: true
},
{
path: 'lesson/home',
diff --git a/src/views/components/filterCity/index.vue b/src/views/components/filterCity/index.vue
index 7272b10f5..faaad7af8 100644
--- a/src/views/components/filterCity/index.vue
+++ b/src/views/components/filterCity/index.vue
@@ -148,6 +148,7 @@ export default {
} else {
// 设置一级选择组件
const mapDict = {};
+ // debugger;
if (this.filterEmpty && this.queryFunction) {
if (this.queryFunction === getPublishMapTree) {
// 查询同一种类citycode的mapList
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index d0359508d..fee2f8173 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -1,9 +1,10 @@
-
+
-
+
+
-
- {{ tnode.label }}
-
+
+
+ {{ tnode.label }}
+
-
+
- 导入地图
+
-
-
-
-
-
-
-
-
-
-
-
- {{ tnode.label }}
-
-
-
-
-
-
- 导入地图
-
-
- 新建地图
-
-
-
+
+
From 3dccd866827bf9b608df415fda655fa2cbbf5f02 Mon Sep 17 00:00:00 2001
From: sunzhenyu
Date: Sun, 29 Sep 2019 09:21:38 +0800
Subject: [PATCH 037/179] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?=E8=BD=A8=E9=81=93link?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jlmap3d/edit/Jlmap3ddata.js | 4 ++--
src/jlmap3d/edit/editmodel/LinkList.js | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/jlmap3d/edit/Jlmap3ddata.js b/src/jlmap3d/edit/Jlmap3ddata.js
index b9a37d365..6ee42ad2c 100644
--- a/src/jlmap3d/edit/Jlmap3ddata.js
+++ b/src/jlmap3d/edit/Jlmap3ddata.js
@@ -46,8 +46,8 @@ export function Jlmap3ddata(mapid,scope){
}else{
// console.log(editmapid);
// console.log(data.data.id);
- init3d(editmapid,data.data);
- // initobj(editmapid,data.data.id);
+ // init3d(editmapid,data.data);
+ initobj(editmapid,data.data.id);
}
}
diff --git a/src/jlmap3d/edit/editmodel/LinkList.js b/src/jlmap3d/edit/editmodel/LinkList.js
index 5f4183aa0..e04436985 100644
--- a/src/jlmap3d/edit/editmodel/LinkList.js
+++ b/src/jlmap3d/edit/editmodel/LinkList.js
@@ -240,11 +240,11 @@ function linkhelp(data,scene){
let rotenum = axixnow.angleTo(axix);
//不同坐标系方向值不同
if(data.lp.y>data.rp.y){
- testmesh2.rotation.z = 0.197;
+ testmesh2.rotation.z = 0.218;
data.lp.x = data.rp.x - (data.lengthFact)*Math.cos(testmesh2.rotation.z);
data.lp.y = data.rp.y + (data.lengthFact)*Math.sin(testmesh2.rotation.z);
}else if(data.lp.ydata.rp.y){
- testmesh2.rotation.z = 0.197;
+ testmesh2.rotation.z = 0.218;
data.rp.x = data.lp.x+(data.lengthFact)*Math.cos(testmesh2.rotation.z);
data.rp.y = data.lp.y-(data.lengthFact)*Math.sin(testmesh2.rotation.z);
}else if(data.lp.y
Date: Sun, 29 Sep 2019 13:40:01 +0800
Subject: [PATCH 038/179] =?UTF-8?q?storage=E5=AD=98=E5=82=A8=E5=85=B3?=
=?UTF-8?q?=E8=81=94=E7=94=A8=E6=88=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/store/modules/user.js | 10 +++++++++-
src/utils/baseUrl.js | 2 +-
src/views/exam/detail/courseDetail.vue | 12 ++++++------
src/views/login/index.vue | 5 +++--
src/views/package/detail.vue | 2 +-
src/views/teach/detail/index.vue | 12 ++++++------
src/views/trainingPlatform/demonList.vue | 18 +++++++++++-------
7 files changed, 37 insertions(+), 24 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 218acaa9e..3c06a0447 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -17,7 +17,8 @@ const user = {
id: '',
admin: false,
wxId: '',
- wxUnionId: ''
+ wxUnionId: '',
+ account: ''
},
mutations: {
@@ -50,6 +51,9 @@ const user = {
},
SET_WXUNIONID: (state, wxUnionId) => {
state.wxUnionId = wxUnionId;
+ },
+ SET_ACCOUNT: (state, account) => {
+ state.account = account;
}
},
@@ -192,6 +196,10 @@ const user = {
reject(error);
});
});
+ },
+
+ SetAccount({ commit }, account) {
+ commit('SET_ACCOUNT', account);
}
}
};
diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js
index 09e20008f..3fe35f56a 100644
--- a/src/utils/baseUrl.js
+++ b/src/utils/baseUrl.js
@@ -6,7 +6,7 @@ export function getBaseUrl() {
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
- BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
+ BASE_API = 'http://192.168.11.0:9000'; // 王兴杰
} else {
BASE_API = process.env.VUE_APP_BASE_API;
}
diff --git a/src/views/exam/detail/courseDetail.vue b/src/views/exam/detail/courseDetail.vue
index 85deeb542..1f95358ec 100644
--- a/src/views/exam/detail/courseDetail.vue
+++ b/src/views/exam/detail/courseDetail.vue
@@ -129,11 +129,11 @@ export default {
treeList: res.data.treeNodeList
};
this.getExpandList(this.courseModel.id);
- this.$nextTick(() => {
- const checkId = getSessionStorage('trainingExamCheckId'+this.courseModel.id) || null;
- this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
- this.loading = false;
- });
+ // this.$nextTick(() => {
+ // const checkId = getSessionStorage('trainingExamCheckId'+this.courseModel.id) || null;
+ // this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
+ // this.loading = false;
+ // });
});
}
@@ -168,7 +168,7 @@ export default {
}
},
clickEvent(obj, node, data) {
- setSessionStorage('trainingExamCheckId', obj.id);
+ // setSessionStorage('trainingExamCheckId', obj.id);
if (obj.type === 'exam') {
if (obj.valid) {
this.$router.push(`${UrlConfig.trainingPlatform.examDetail}/${obj.id}`);
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 85ae515f9..d21243f29 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -104,11 +104,12 @@ export default {
removeSessionStorage('againEnter');
this.$store.dispatch('Login', model).then(() => {
this.$store.dispatch('GetUserConfigInfo');
+ this.$store.dispatch('SetAccount', model.username);
// 设置路由
this.loading = false;
this.tipsMsg = '';
- let path = localStore.get('trainingPlatformRoute');
- if (!path) {
+ let path = localStore.get('trainingPlatformRoute'+model.username);
+ if (!path || !path.startsWith('/trainingPlatform')) {
path = UrlConfig.trainingPlatform.trainingPlatformHome;
}
this.$router.push({ path: path });
diff --git a/src/views/package/detail.vue b/src/views/package/detail.vue
index f18c26b67..fbbc41378 100644
--- a/src/views/package/detail.vue
+++ b/src/views/package/detail.vue
@@ -36,7 +36,7 @@ export default {
indexShow: true,
columns: [
{
- title: '权限名称',
+ title: this.$t('orderAuthor.permissionName'),
prop: 'name'
},
{
diff --git a/src/views/teach/detail/index.vue b/src/views/teach/detail/index.vue
index 36dac7a61..ebb7c5a04 100644
--- a/src/views/teach/detail/index.vue
+++ b/src/views/teach/detail/index.vue
@@ -124,11 +124,11 @@ export default {
PermissionType: PermissionType.LESSON
};
this.getExpandList(this.courseModel.id);
- this.$nextTick(() => {
- const checkId = getSessionStorage('trainingTeachCheckId'+this.courseModel.id) || null;
- this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
- this.loading = false;
- });
+ // this.$nextTick(() => {
+ // const checkId = getSessionStorage('trainingTeachCheckId'+this.courseModel.id) || null;
+ // this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
+ // this.loading = false;
+ // });
}).catch(error => {
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
});
@@ -149,7 +149,7 @@ export default {
}
},
clickEvent(obj, node, ele) {
- setSessionStorage('trainingTeachCheckId'+this.courseModel.prdCode, obj.id);
+ // setSessionStorage('trainingTeachCheckId'+this.courseModel.prdCode, obj.id);
if (obj && obj.type==='training') {
if (obj.valid) {
this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${obj.id}/${node.id}`});
diff --git a/src/views/trainingPlatform/demonList.vue b/src/views/trainingPlatform/demonList.vue
index 8c0834865..b6a02f303 100644
--- a/src/views/trainingPlatform/demonList.vue
+++ b/src/views/trainingPlatform/demonList.vue
@@ -34,7 +34,6 @@
import { getPublishMapTree } from '@/api/management/mapprd';
import { getTrainingSystemList } from '@/api/trainingPlatform'
import { UrlConfig } from '@/router/index';
- import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
import FilterCity from '@/views/components/filterCity';
import localStore from 'storejs';
@@ -76,6 +75,11 @@
});
}
},
+ computed: {
+ account() {
+ return this.$store.state.user.account;
+ },
+ },
beforeDestroy () {
},
mounted() {
@@ -92,7 +96,7 @@
}
},
clickEvent(obj, data, ele) {
- setSessionStorage('trainingPlatformCheckId'+this.filterSelect, obj.id);
+ localStore.set('trainingPlatformCheckId'+this.filterSelect+this.account, obj.id);
while (data) {
if (data.data.type === 'map') {
this.mapId = data.data.id;
@@ -110,7 +114,7 @@
} else if ( obj.type === '考试系统' ){
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.mapId}`, query: { prodId: obj.code, type: obj.type }});
}
- localStore.set('trainingPlatformRoute',this.$router.history.current.fullPath);
+ localStore.set('trainingPlatformRoute'+this.account,this.$router.history.current.fullPath);
},
async refresh(filterSelect) {
this.loading = true;
@@ -124,7 +128,7 @@
: res.data;
this.getExpandList(filterSelect);
this.$nextTick(() => {
- const checkId = getSessionStorage('trainingPlatformCheckId'+filterSelect) || null;
+ const checkId = localStore.get('trainingPlatformCheckId'+filterSelect+this.account) || null;
this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
this.loading = false;
});
@@ -137,15 +141,15 @@
const key = obj.id;
this.expandList = this.expandList.filter(item => item!==key);
this.expandList.push(key);
- setSessionStorage('trainIngPlatformExpandList'+this.filterSelect,this.expandList)
+ localStore.set('trainIngPlatformExpandList'+this.filterSelect+this.account,this.expandList)
},
nodeCollapse(obj, node, ele) {
const key = obj.id;
this.expandList = this.expandList.filter(item => item!==key);
- setSessionStorage('trainIngPlatformExpandList'+this.filterSelect,this.expandList)
+ localStore.set('trainIngPlatformExpandList'+this.filterSelect+this.account,this.expandList)
},
getExpandList(filterSelect) {
- let expand = getSessionStorage('trainIngPlatformExpandList'+filterSelect);
+ let expand = localStore.get('trainIngPlatformExpandList'+filterSelect+this.account);
expand = expand?(expand+'').split(','):'';
if (expand instanceof Array){
this.expandList = expand;
From a502d0a118368e2467cba6b6195216135a65443e Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Sun, 29 Sep 2019 14:21:06 +0800
Subject: [PATCH 039/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96=20?=
=?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=B9=B3=E5=8F=B0=E9=A1=B5=E9=9D=A2=E8=B0=83?=
=?UTF-8?q?=E6=95=B4=E4=BB=A5=E5=8F=8A=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/i18n/langs/en/router.js | 1 +
src/i18n/langs/zh/router.js | 1 +
src/layout/components/Navbar.vue | 3 +
src/router/index.js | 72 ++++-
src/views/components/filterCity/index.vue | 6 +-
src/views/designPlatform/demonList.vue | 83 +-----
src/views/designPlatform/index.vue | 26 +-
src/views/designPlatform/userDemonList.vue | 289 +++++++++++++++++++++
src/views/designPlatform/userIndex.vue | 144 ++++++++++
9 files changed, 518 insertions(+), 107 deletions(-)
create mode 100644 src/views/designPlatform/userDemonList.vue
create mode 100644 src/views/designPlatform/userIndex.vue
diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js
index 783551fdb..a4ede15f8 100644
--- a/src/i18n/langs/en/router.js
+++ b/src/i18n/langs/en/router.js
@@ -8,6 +8,7 @@ export default {
productEdit: 'Product editor',
designhomePage: 'Public map',
+ designUserPage: 'Personal map',
lessaonManage: 'Lesson',
lessonEdit: 'Lesson editor',
diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js
index c9e522725..315175f96 100644
--- a/src/i18n/langs/zh/router.js
+++ b/src/i18n/langs/zh/router.js
@@ -2,6 +2,7 @@ export default {
homePage: '首页',
designhomePage: '公共地图',
+ designUserPage: '个人地图',
mapManage: '地图管理',
skinManage: '皮肤管理',
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index bfb179b4e..1d930a207 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -98,6 +98,9 @@ export default {
])
},
mounted() {
+ console.log(this.$route);
+ // debugger;
+ // this.routers
this.routes = this.$router.options.routes;
if (getSessionStorage('design')) {
this.isShow=false;
diff --git a/src/router/index.js b/src/router/index.js
index 3ec0099f6..fab07e8c8 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -64,6 +64,7 @@ import PlanMonitorDetail from '@/views/planMonitor/detail';
import DesignPlatformHome from '@/views/designPlatform/home';
import DesignPlatform from '@/views/designPlatform/index';
+import DesignPlatformUser from '@/views/designPlatform/userIndex';
import Replay from '@/views/replay/index';
import Package from '@/views/package/index';
@@ -174,7 +175,7 @@ export const UrlConfig = {
pay: '/plan/pay'
},
design: {
- prefix: '/design',
+ prefix: '/design/home',
// tool: '/design/tool',
// detail: '/plan/detail',
// pay: '/plan/pay'
@@ -186,6 +187,12 @@ export const UrlConfig = {
runPlan: '/design/runPlan/detail',
scriptHome: '/design/script/home'
},
+ designUser: {
+ scriptHome: '/design/userlist/script/home',
+ mapDraw: '/design/userlist/map/draw',
+ lessonHome: '/design/userlist/lesson/home',
+ runPlan: '/design/userlist/runPlan/detail'
+ },
replay: {
prefix: '/replay'
},
@@ -388,9 +395,72 @@ export const asyncRouter = [
path: 'home',
component: DesignPlatformHome,
meta: {
+ }
+ },
+ {
+ path: 'map/draw/:mapId/:view',
+ component: Mapedit,
+ hidden: true
+ },
+ {
+ path: 'lesson/edit',
+ component: Lessoncategory,
+ hidden: true
+ },
+ {
+ path: 'runPlan/detail/:lessonId',
+ component: PlanMonitorDetail,
+ hidden: true
+ },
+ {
+ path: 'script/home/:mapId',
+ component: ScriptmanageHome,
+ meta: {
+ i18n: 'router.scriptManage'
},
hidden: true
},
+ {
+ path: 'lesson/home',
+ component: LessonHome,
+ hidden: true
+ },
+ {
+ path: 'lesson/manage',
+ component: LessonManage,
+ hidden: true
+ },
+ {
+ path: 'lesson/training/:trainingId/:trainingName',
+ component: TrainingrecordManage,
+ hidden: true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ path: '/design/userlist',
+ component: Layout,
+ meta: {
+ roles: [admin, user, userDesign]
+ },
+ children: [
+ {
+ path: '',
+ redirect: '/design/userlist/home',
+ component: DesignPlatformUser,
+ meta: {
+ i18n: 'router.designUserPage',
+ icon: 'design'
+ },
+ children: [
+ {
+ path: 'home',
+ component: DesignPlatformHome,
+ meta: {
+ }
+ },
{
path: 'map/draw/:mapId/:view',
component: Mapedit,
diff --git a/src/views/components/filterCity/index.vue b/src/views/components/filterCity/index.vue
index faaad7af8..c10953586 100644
--- a/src/views/components/filterCity/index.vue
+++ b/src/views/components/filterCity/index.vue
@@ -21,7 +21,8 @@
+
\ No newline at end of file
diff --git a/src/views/designPlatform/userIndex.vue b/src/views/designPlatform/userIndex.vue
new file mode 100644
index 000000000..b13062608
--- /dev/null
+++ b/src/views/designPlatform/userIndex.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 6c8a8574dae7116437dc4dcc4f3f4f1be45b35d3 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Sun, 29 Sep 2019 14:27:58 +0800
Subject: [PATCH 040/179] =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/designPlatform.js | 10 ++
src/router/index.js | 2 +-
src/views/designPlatform/demonList.vue | 4 +-
src/views/lesson/home.vue | 240 ++++++++-----------------
4 files changed, 88 insertions(+), 168 deletions(-)
create mode 100644 src/api/designPlatform.js
diff --git a/src/api/designPlatform.js b/src/api/designPlatform.js
new file mode 100644
index 000000000..d743900dc
--- /dev/null
+++ b/src/api/designPlatform.js
@@ -0,0 +1,10 @@
+import request from '@/utils/request';
+
+export function getDraftLesson(params, mapId) {
+ /** 根据mapId获取草稿课程 */
+ return request({
+ url: `/api/mapSystem/findDraftLessonBy/${mapId}`,
+ method: 'get',
+ params
+ });
+}
diff --git a/src/router/index.js b/src/router/index.js
index 3ec0099f6..c1073c6d7 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -415,7 +415,7 @@ export const asyncRouter = [
hidden: true
},
{
- path: 'lesson/home',
+ path: 'lesson/home/:mapId',
component: LessonHome,
hidden: true
},
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index fee2f8173..25d7bf39e 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -145,7 +145,7 @@
break;
}
case 'lessonDesign': {
- this.$router.push({ path: `${UrlConfig.design.lessonHome}` });
+ this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.mapId}` });
break;
}
case 'runPlanDesign': {
@@ -153,7 +153,7 @@
break;
}
}
- this.$refs.menu.doClose();
+ // this.$refs.menu.doClose();
},
// async myrefresh(filterSelect){
diff --git a/src/views/lesson/home.vue b/src/views/lesson/home.vue
index 4da8e8a7c..be72f3d28 100644
--- a/src/views/lesson/home.vue
+++ b/src/views/lesson/home.vue
@@ -1,188 +1,98 @@
-
-
- 课程管理系统
-
-
-
课程管理说明:
- {{ courseModel.remarks }}
-
-
-
-
-
- {{ node.label +'(免费)'}}
- {{ node.label }}
-
-
-
-
-
-
- 课程编辑
- 实训录制
- 任务管理
- 操作定义
- 实训管理
- 从发布课程新建
-
-
-
+
+
+
+
+
+
+
+
+
+
From 0aa02cc85c611d4a55c148c4bd39f5fd2ee6fca4 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Sun, 29 Sep 2019 15:25:23 +0800
Subject: [PATCH 041/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96=20?=
=?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=8F=B3=E9=94=AE=E6=93=8D=E4=BD=9C=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/components/filterCity/index.vue | 1 +
src/views/designPlatform/userDemonList.vue | 9 +++++----
src/views/map/mapdraft/mapmanage/edit.vue | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/views/components/filterCity/index.vue b/src/views/components/filterCity/index.vue
index c10953586..eccbb124e 100644
--- a/src/views/components/filterCity/index.vue
+++ b/src/views/components/filterCity/index.vue
@@ -121,6 +121,7 @@ export default {
},
async loadInitData() {
// 获取城市列表
+ this.filterOptions=[];
const resp = await this.$Dictionary.cityType();
const cityList = resp.sort((a, b) => {
return a.code.localeCompare(b.code);
diff --git a/src/views/designPlatform/userDemonList.vue b/src/views/designPlatform/userDemonList.vue
index 8281c1bc8..59749d159 100644
--- a/src/views/designPlatform/userDemonList.vue
+++ b/src/views/designPlatform/userDemonList.vue
@@ -78,7 +78,6 @@
loading: true,
defaultShowKeys: [],
queryFunction:getUserMapTree,
- // queryFunction: getPublishMapTree,
filterText: '',
treeData: [],
treeList: [],
@@ -135,6 +134,7 @@
res.data.forEach(elem=>{
// if(elem.children)
// {
+ elem.type="map",
elem.children=[
{
id:'1',
@@ -200,7 +200,7 @@
this.$refs.menu.doClose();
},
showContextMenu(e, obj, node, vueElem) {
- if (obj && obj.type == 'mapDesign') {
+ if (obj && obj.type == 'map') {
e.preventDefault();
const menu = DeviceMenu.Map;
@@ -209,7 +209,7 @@
y: e.clientY
};
this.editModel = obj;
- this.editModel.skinCode = node.parent.data.id;
+ this.editModel.skinCode = node.data.skinCode;
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
else{
@@ -217,7 +217,8 @@
}
},
refresh1(){
-
+ this.$refs.myfilerCity.loadInitData();
+ this.refresh();
},
refresh2(){
this.$refs.myfilerCity.loadInitData();
diff --git a/src/views/map/mapdraft/mapmanage/edit.vue b/src/views/map/mapdraft/mapmanage/edit.vue
index 0f4036cf1..5c8d9d18f 100644
--- a/src/views/map/mapdraft/mapmanage/edit.vue
+++ b/src/views/map/mapdraft/mapmanage/edit.vue
@@ -12,7 +12,7 @@
@submit.native.prevent
>
-
+
Date: Sun, 29 Sep 2019 15:55:01 +0800
Subject: [PATCH 042/179] =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/router/index.js | 2 +-
src/views/designPlatform/index.vue | 4 +-
src/views/designPlatform/userDemonList.vue | 8 +-
src/views/lesson/home.vue | 105 +++++++++------------
4 files changed, 53 insertions(+), 66 deletions(-)
diff --git a/src/router/index.js b/src/router/index.js
index cd1fdb6cc..ae8c064c6 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -421,7 +421,7 @@ export const asyncRouter = [
hidden: true
},
{
- path: 'lesson/home',
+ path: 'lesson/home/:mapId',
component: LessonHome,
hidden: true
},
diff --git a/src/views/designPlatform/index.vue b/src/views/designPlatform/index.vue
index 825eed8f9..906281c06 100644
--- a/src/views/designPlatform/index.vue
+++ b/src/views/designPlatform/index.vue
@@ -76,7 +76,7 @@
drapWidth(width) {
this.widthLeft = Number(width);
},
-
+
refresh1() {
},
@@ -96,7 +96,7 @@
const heights = this.$store.state.app.height - 90;
this.$store.dispatch('config/resize', { width: widths, height: heights });
}
-
+
}
};
diff --git a/src/views/designPlatform/userDemonList.vue b/src/views/designPlatform/userDemonList.vue
index 59749d159..e73e57a30 100644
--- a/src/views/designPlatform/userDemonList.vue
+++ b/src/views/designPlatform/userDemonList.vue
@@ -189,7 +189,7 @@
break;
}
case 'lessonDesign': {
- this.$router.push({ path: `${UrlConfig.designUser.lessonHome}` });
+ this.$router.push({ path: `${UrlConfig.designUser.lessonHome}/${this.mapId}` });
break;
}
case 'runPlanDesign': {
@@ -217,11 +217,11 @@
}
},
refresh1(){
- this.$refs.myfilerCity.loadInitData();
+ this.$refs.myfilerCity.loadInitData();
this.refresh();
},
refresh2(){
- this.$refs.myfilerCity.loadInitData();
+ this.$refs.myfilerCity.loadInitData();
this.refresh();
},
jlmap3d() {
@@ -287,4 +287,4 @@
.map-list-main{
text-align:left;
}
-
\ No newline at end of file
+
diff --git a/src/views/lesson/home.vue b/src/views/lesson/home.vue
index be72f3d28..92aa9a904 100644
--- a/src/views/lesson/home.vue
+++ b/src/views/lesson/home.vue
@@ -1,29 +1,41 @@
-
-
-
-
-
-
-
-
-
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+ 创建章节
+ 内容排序
+ {{ scope.row.type==='lesson'? '编辑课程':'更新章节' }}
+
+
+
+
@@ -41,49 +53,20 @@
},
data() {
return {
- tableData: [{
- id: 1,
- date: '2016-05-02',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }, {
- id: 2,
- date: '2016-05-04',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1517 弄'
- }, {
- id: 3,
- date: '2016-05-01',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1519 弄',
- children: [{
- id: 31,
- date: '2016-05-01',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1519 弄'
- }, {
- id: 32,
- date: '2016-05-01',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1519 弄'
- }]
- }, {
- id: 4,
- date: '2016-05-03',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1516 弄'
- }],
+ tableData: [],
+ loading: 'false'
};
},
mounted() {
- console.log('==============');
+ this.loading = true;
this.loadInitData();
},
methods: {
loadInitData() {
getDraftLesson({},this.mapId).then(response=> {
- console.log(response);
+ this.tableData = response.data;
+ this.loading = false;
});
}
}
@@ -95,4 +78,8 @@
text-align: center;
margin: 20px auto;
}
+ .button_group {
+ float: right;
+ margin: 10px 10px;
+ }
From 8d4bf59c34f954fb13f85d38942c31940e5fcd88 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Sun, 29 Sep 2019 15:57:19 +0800
Subject: [PATCH 043/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/designPlatform.js | 8 ++++++++
src/api/management/mapprd.js | 9 ---------
src/views/designPlatform/userDemonList.vue | 2 +-
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/api/designPlatform.js b/src/api/designPlatform.js
index d743900dc..434faadef 100644
--- a/src/api/designPlatform.js
+++ b/src/api/designPlatform.js
@@ -8,3 +8,11 @@ export function getDraftLesson(params, mapId) {
params
});
}
+
+/** 获取用户地图树 */
+export function getUserMapTree(cityCode) {
+ return request({
+ url: `/api/mapSystem/findDraftMapByCityCode?cityCode=${cityCode}`,
+ method: 'get'
+ });
+}
diff --git a/src/api/management/mapprd.js b/src/api/management/mapprd.js
index 80eef4871..384e5759c 100644
--- a/src/api/management/mapprd.js
+++ b/src/api/management/mapprd.js
@@ -8,15 +8,6 @@ export function getPublishMapTree(cityCode) {
});
}
-/** 获取用户地图树 */
-export function getUserMapTree(cityCode) {
- return request({
- url: `/api/mapSystem/findDraftMapByCityCode?cityCode=${cityCode}`,
- method: 'get'
- });
- // api//?cityCode=350100
-}
-
/** 获取产品详细内容*/
export function getProductDetail(prdCode) {
return request({
diff --git a/src/views/designPlatform/userDemonList.vue b/src/views/designPlatform/userDemonList.vue
index 59749d159..96acef986 100644
--- a/src/views/designPlatform/userDemonList.vue
+++ b/src/views/designPlatform/userDemonList.vue
@@ -50,7 +50,7 @@
diff --git a/src/views/lesson/lessoncategory/edit/sorttree/index.vue b/src/views/lesson/lessoncategory/edit/sorttree/index.vue
index 7e1679712..31ceb1faf 100644
--- a/src/views/lesson/lessoncategory/edit/sorttree/index.vue
+++ b/src/views/lesson/lessoncategory/edit/sorttree/index.vue
@@ -54,20 +54,25 @@ export default {
}
},
methods: {
- convertTreeData(list, node) {
+ convertTreeData(list, data) {
let tree = [];
- if (node && node.data && list && list.length) {
+ if (data && list && list.length) {
list.forEach(elem => {
- if (node.data.name == elem.name) {
- tree = [elem];
- }
+ if (elem.children){
+ elem.children.forEach( item => {
+ if (data.id == item.id) {
+ tree = [elem];
+ }
+ })
+ }
});
}
return tree;
},
- initData(node) {
+ initData(data) {
getLessonTree({ mapId: '' }).then(response => {
- this.treeData = this.convertTreeData(response.data, node);
+ this.treeData = this.convertTreeData(response.data, data);
+ console.log('=======',response,this.treeData);
}).catch(() => {
this.$messageBox(this.$t('error.refreshFailed'));
});
@@ -85,16 +90,17 @@ export default {
return draggingNode && (draggingNode.data.type === 'chapter' || draggingNode.data.type === 'training');
},
getLeesonId(node) {
- if (node.parent.parent !== null) {
- return this.getLeesonId(node.parent);
- } else {
- return node;
- }
+ if (node.parent.data.type === 'lesson'){
+ console.log(node, '======',node.parent.data.id);
+ return node.parent.data.id;
+ }else {
+ return this.getLeesonId(node.parent)
+ }
},
handleDragEnd(draggingNode, dropNode, dropType, ev) {
if (draggingNode && dropNode && dropType !== 'none') {
- const lesson = this.getLeesonId(dropNode);
- const lessonId = lesson.data.id;
+ const lessonId = this.getLeesonId(dropNode);
+ console.log('======**-*-',lessonId);
const model = {
location: dropType,
sourceId: draggingNode.data.id,
diff --git a/src/views/lesson/taskmanage/list.vue b/src/views/lesson/taskmanage/list.vue
index 296f05a49..f2bb95231 100644
--- a/src/views/lesson/taskmanage/list.vue
+++ b/src/views/lesson/taskmanage/list.vue
@@ -3,6 +3,11 @@
+
+
+ {{ $t('global.back') }}
+
+
@@ -165,6 +170,16 @@
createTask() {
this.$refs.CreateTask.doShow();
},
+ turnback() {
+ this.$router.go(-1)
+ },
}
}
+
diff --git a/src/views/lesson/trainingRule/list.vue b/src/views/lesson/trainingRule/list.vue
index 90092c59d..02b454f49 100644
--- a/src/views/lesson/trainingRule/list.vue
+++ b/src/views/lesson/trainingRule/list.vue
@@ -4,7 +4,13 @@
+
+
+ {{ $t('global.back') }}
+
+
+
+
diff --git a/src/views/lesson/trainingmanage/index.vue b/src/views/lesson/trainingmanage/index.vue
index 8af900867..8ebd0ceba 100644
--- a/src/views/lesson/trainingmanage/index.vue
+++ b/src/views/lesson/trainingmanage/index.vue
@@ -8,6 +8,11 @@
:training-operate-type-map="trainingOperateTypeMap"
@refresh="reloadTable"
/>
+
+
+ {{ $t('global.back') }}
+
+
@@ -142,7 +147,12 @@ export default {
name: this.$t('lesson.demonstration'),
handleClick: this.demoDisplay,
type: ''
- }
+ },
+ {
+ name: '实训录制',
+ handleClick: this.trainingRecord,
+ type: ''
+ }
]
}
],
@@ -270,7 +280,25 @@ export default {
},
reloadTable() {
this.queryList.reload();
- }
+ },
+ turnback() {
+ this.$router.go(-1)
+ },
+ trainingRecord(index, node) {
+ trainingNotify({ trainingId: node.id }).then(resp => {
+ this.group = resp.data;
+ this.$router.push({ path: `${UrlConfig.design.trainingRecord}/${node.id}/${node.name}`, query: { group: resp.data } });
+ }).catch(error => {
+ this.$messageBox(`${this.$t('error.createSimulationFailed')}: ${error.message}`);
+ });
+ }
}
};
+
From a46f94f85e3c8ec48d892f0be5a7bed0ad99fd7c Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Mon, 30 Sep 2019 17:31:40 +0800
Subject: [PATCH 051/179] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96=20?=
=?UTF-8?q?=E8=AE=BE=E8=AE=A1=E7=B3=BB=E7=BB=9F=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/quest.js | 9 ++++++---
src/permission.js | 23 +++++++++++++----------
src/store/modules/user.js | 1 -
src/utils/auth.js | 28 ++++++++++++++++++++--------
src/utils/login.js | 2 +-
5 files changed, 40 insertions(+), 23 deletions(-)
diff --git a/src/api/quest.js b/src/api/quest.js
index 7baa7b116..799467a5c 100644
--- a/src/api/quest.js
+++ b/src/api/quest.js
@@ -10,7 +10,8 @@ export function getQuestPageList(mapId) {
/** 创建任务 */
export function createQuest(data) {
return request({
- url: `/api/script`,
+ // url: `/api/script`,
+ url: `/api/script/draft/create`,
method: 'post',
data
});
@@ -18,7 +19,8 @@ export function createQuest(data) {
/** 根据任务id删除任务 */
export function deleteQuest(id) {
return request({
- url: `/api/script/${id}`,
+ // url: `/api/script/${id}`,
+ url: `/api/script/draft/${id}/delete`,
method: 'delete'
});
}
@@ -39,7 +41,8 @@ export function getQuestByIdList(id) {
/** 更新任务基本信息 */
export function updateQuest(id, data) {
return request({
- url: `/api/script/${id}`,
+ // url: `/api/script/${id}`,
+ url: `/api/script/draft/${id}/update`,
method: 'put',
data
});
diff --git a/src/permission.js b/src/permission.js
index cf0a42dc8..8a3547478 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -4,7 +4,8 @@ import router from './router';
import NProgress from 'nprogress'; // Progress 进度条
import 'nprogress/nprogress.css';// Progress 进度条样式
import { admin, userDesign} from './router';
-import { getToken, getScreenToken, getPlanToken } from '@/utils/auth'; // 验权
+import { getToken, getScreenToken, getDesignToken} from '@/utils/auth'; // 验权
+// getPlanToken
import { LoginParams } from '@/utils/login';
import { getSessionStorage } from '@/utils/auth';
@@ -16,14 +17,15 @@ function hasPermission(roles, permissionRoles) {
const isDev = process.env.NODE_ENV === 'development';
-const whiteList = ['/login', '/login1', '/dp/login', '/dp/login1', '/plan/login', '/plan/login1', '/design/login1']; // 不重定向白名单
+// '/plan/login', '/plan/login1',
+const whiteList = ['/login', '/login1', '/dp/login', '/dp/login1', '/design/login1']; // 不重定向白名单
const loginPage = isDev ? whiteList[1] : whiteList[0];
const loginScreenPage = isDev ? whiteList[3] : whiteList[2];
-const loginPlanPage = isDev ? whiteList[5] : whiteList[4];
-const loginDesignPage = isDev ? whiteList[6] : whiteList[6];
+// const loginPlanPage = isDev ? whiteList[5] : whiteList[4];
+const loginDesignPage = isDev ? whiteList[4] : whiteList[4];
// 获取路径数据
function getRouteInfo(to) {
@@ -36,13 +38,14 @@ function getRouteInfo(to) {
loginPath = loginScreenPage;
getTokenInfo = getScreenToken;
clientId = LoginParams.DaPing.clientId;
- } else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath) || /^\/planEdit/.test(toRoutePath)) {
- loginPath = loginPlanPage;
- getTokenInfo = getToken;
- clientId = LoginParams.LianJiHua.clientId;
- } else if (/^\/design/.test(toRoutePath)) {
+ }
+ // else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath) || /^\/planEdit/.test(toRoutePath)) {
+ // loginPath = loginPlanPage;
+ // getTokenInfo = getToken;
+ // clientId = LoginParams.LianJiHua.clientId;
+ else if (/^\/design/.test(toRoutePath) || /^\/scriptDisplay/.test(toRoutePath) || /^\/plan/.test(toRoutePath) || /^\/publish/.test(toRoutePath) || /^\/orderauthor/.test(toRoutePath) || /^\/orderauthor/.test(system)) {
loginPath = loginDesignPage;
- getTokenInfo = getToken;
+ getTokenInfo = getDesignToken;
clientId = LoginParams.Design.clientId;
} else {
loginPath = loginPage;
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 3c06a0447..0d9226688 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -132,7 +132,6 @@ const user = {
// 获取用户信息
GetInfo({ commit }, getTokenInfo) {
return new Promise((resolve, reject) => {
- // debugger;
getInfo(getTokenInfo()).then(response => {
const user = response.data;
if (user.roles && user.roles.length > 0) { // 验证返回的roles是否是一个非空数组
diff --git a/src/utils/auth.js b/src/utils/auth.js
index 8b97f45e2..8e18ffa97 100644
--- a/src/utils/auth.js
+++ b/src/utils/auth.js
@@ -7,7 +7,7 @@ const TokenScreenKey = 'Screen-Token';
const TokenPlanKey = 'Plan-Token';
-const TokenDesignKey='Admin-Token';
+const TokenDesignKey='Design-Token';
// 设置教学,实训,仿真系统token
export function getToken() {
@@ -67,9 +67,13 @@ export function handleToken() {
const path = window.location.href;
if (path.includes('/dp/') || path.includes('/display/dp')) {
return getScreenToken();
- } else if (path.includes('/plan') || path.includes('/display/plan')) {
- return getPlanToken();
- } else {
+ } else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/plan') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system')) {
+ return getDesignToken();
+ }
+ // else if (path.includes('/plan') || path.includes('/display/plan')) {
+ // return getPlanToken();
+ // }
+ else {
return getToken();
}
}
@@ -79,8 +83,12 @@ export function handleRemoveToken() {
const path = window.location.href;
if (path.includes('/dp/') || path.includes('/display/dp')) {
return removeScreenToken();
- } else if (path.includes('/plan') || path.includes('/display/plan')) {
- return removePlanToken();
+ }
+ // else if (path.includes('/plan') || path.includes('/display/plan')) {
+ // return removePlanToken();
+ // }
+ else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/plan') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system')) {
+ return removeDesignToken();
} else {
return removeToken();
}
@@ -92,8 +100,12 @@ export function gainClientId() {
let clientId = null;
if (path.includes('/dp/') || path.includes('/display/dp')) {
clientId = LoginParams.DaPing.clientId;
- } else if (path.includes('/plan') || path.includes('/display/plan')) {
- clientId = LoginParams.LianJiHua.clientId;
+ }
+ // else if (path.includes('/plan') || path.includes('/display/plan')) {
+ // clientId = LoginParams.LianJiHua.clientId;
+ // }
+ else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/plan') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system')) {
+ clientId = LoginParams.Design.clientId;
}
return clientId;
diff --git a/src/utils/login.js b/src/utils/login.js
index 6dad0c93f..7697c4cfa 100644
--- a/src/utils/login.js
+++ b/src/utils/login.js
@@ -5,5 +5,5 @@ export const LoginParams = {
DaPing: { clientId: '2', secret: 'bigscreen' }, // "大屏系统"
LianJiHua: { clientId: '3', secret: 'linkplan' }, // "琏计划"
Assistant: { clientId: '4', secret: 'linkassistant' }, // "琏课堂助手"
- Design: { clientId: '1', secret: 'joylink' } // "城市轨道交通设计平台"
+ Design: { clientId: '6', secret: 'design' } // "城市轨道交通设计平台"
};
From 641345e80119d2bb59934d69dea57bfbde0039ae Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Mon, 30 Sep 2019 17:56:16 +0800
Subject: [PATCH 052/179] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=B9=B3=E5=8F=B0?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/QueryListPage/QueryForm.vue | 10 +++++++---
src/views/error-page/404.vue | 10 +++++++---
src/views/lesson/home.vue | 6 +++++-
.../lesson/lessoncategory/edit/sorttree/index.vue | 3 ---
4 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/src/components/QueryListPage/QueryForm.vue b/src/components/QueryListPage/QueryForm.vue
index 5ef16def7..51a24c6ac 100644
--- a/src/components/QueryListPage/QueryForm.vue
+++ b/src/components/QueryListPage/QueryForm.vue
@@ -128,9 +128,9 @@
- {{ $t('global.query') }}
- {{ $t('global.reset') }}
- {{ $t('global.export') }}
+ {{ $t('global.query') }}
+ {{ $t('global.reset') }}
+ {{ $t('global.export') }}
{{ button.text }}
@@ -480,4 +481,7 @@ export default {
max-width: 240px;
min-width: 100px;
}
+ .button_style {
+ margin-bottom: 10px;
+ }
diff --git a/src/views/error-page/404.vue b/src/views/error-page/404.vue
index 03e20fcd5..c94ad1250 100644
--- a/src/views/error-page/404.vue
+++ b/src/views/error-page/404.vue
@@ -15,21 +15,25 @@
{{ message }}
Please check that the URL you entered is correct, or click the button below to
return to the homepage.
-
Back to home
+