Merge remote-tracking branch 'origin/test'

# Conflicts:
#	.env.production
This commit is contained in:
joylink_fanyuhong 2022-01-05 17:58:55 +08:00
commit 5bf48a83f0
64 changed files with 1336 additions and 940 deletions

View File

@ -5,10 +5,10 @@ NODE_ENV = 'development'
# base api
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
# VUE_APP_BASE_API = 'http://192.168.3.4:9000'
VUE_APP_BASE_API = 'http://192.168.3.6:9000'
VUE_APP_VOICE_API = 'http://119.3.163.89/oss/joylink'
VUE_APP_UPLOAD_API = 'http://joylink.club/jlfile'
VUE_APP_BASE_SITE='https://test.joylink.club/cbtc'
# VUE_APP_BASE_API = 'http://192.168.3.6:9000'
# VUE_APP_VOICE_API = 'http://119.3.163.89/oss/joylink'
# VUE_APP_UPLOAD_API = 'http://joylink.club/jlfile'
# VUE_APP_BASE_SITE='https://test.joylink.club/cbtc'
# VUE_APP_VOICE_API = 'http://192.168.8.110:9008'

View File

@ -3,7 +3,7 @@ NODE_ENV = 'production'
VUE_APP_PRO = 'local'
# base api
VUE_APP_BASE_API = 'http://160.20.60.15:9000'
VUE_APP_VOICE_API = 'http://160.20.60.15/oss/joylink'
VUE_APP_UPLOAD_API = 'http://160.20.60.15'
VUE_APP_BASE_SITE='http://160.20.60.15'
# VUE_APP_BASE_API = 'http://160.20.60.15:9000'
# VUE_APP_VOICE_API = 'http://160.20.60.15/oss/joylink'
# VUE_APP_UPLOAD_API = 'http://160.20.60.15'
# VUE_APP_BASE_SITE='http://160.20.60.15'

View File

@ -3,7 +3,7 @@ NODE_ENV = 'production'
VUE_APP_PRO = 'ntyl'
# base api
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
VUE_APP_BASE_SITE='https://joylink.club/cbtc'
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
# VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
# VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
# VUE_APP_BASE_SITE='https://joylink.club/cbtc'

View File

@ -2,7 +2,7 @@
NODE_ENV = 'production'
# base api
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
VUE_APP_UPLOAD_API = 'https://joylink.club/jlfile/'
VUE_APP_BASE_SITE='https://joylink.club/cbtc'
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
# VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
# VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
# VUE_APP_BASE_SITE='https://joylink.club/cbtc'

View File

@ -2,7 +2,7 @@
NODE_ENV = 'test'
# base api
VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
VUE_APP_BASE_SITE='https://test.joylink.club/cbtc'
# VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
# VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
# VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
# VUE_APP_BASE_SITE='https://test.joylink.club/cbtc'

View File

@ -309,3 +309,10 @@ export function getUserDuration(params) {
params
});
}
/** 获取单位二维码 */
export function getCompanyQrCode(orgId) {
return request({
url: `/api/company/${orgId}/qrCode`,
method: 'get'
});
}

View File

@ -1,10 +1,10 @@
import request from '@/utils/request';
import store from '@/store/index';
const publicPath = process.env.VUE_APP_PRO == 'local' ? '' : '/cbtc';
export const JL3D_LOCAL_STATIC = publicPath+"/static";
const BASE_UPLOAD_API = process.env.VUE_APP_UPLOAD_API;
export const BASE_ASSET_API = process.env.VUE_APP_VOICE_API;
const BASE_UPLOAD_API = store.state.user.uploadUrl;
export const BASE_ASSET_API = store.state.user.resourcesUrl;
// console.log(JL3D_LOCAL_STATIC);
// console.log(BASE_UPLOAD_API);
// console.log(BASE_ASSET_API);

View File

@ -1,5 +1,5 @@
import request from '@/utils/request';
//获取三维课程草稿列表
export function getLesson3dDrftList(params) {
return request({
url: `/api/draft3dLesson/paging`,
@ -7,7 +7,7 @@ export function getLesson3dDrftList(params) {
params: params
});
}
//获取三维课程草稿数据
export function getLesson3dData(lessonId) {
return request({
url: `/api/draft3dLesson/${lessonId}`,
@ -15,13 +15,47 @@ export function getLesson3dData(lessonId) {
params: ''
});
}
//获取三维课程发布数据
export function getPublishLesson3dData(lessonId) {
return request({
url: `/api/lesson3d/${lessonId}`,
method: 'get',
params: ''
});
}
//上架课程
export function onlineLesson3d(lessonId) {
return request({
url: `/api/lesson3d/${lessonId}/online`,
method: 'put',
params: ''
});
}
//下架课程
export function offlineLesson3d(lessonId) {
return request({
url: `/api/lesson3d/${lessonId}/offline`,
method: 'put',
params: ''
});
}
export function getSelectLesson3dList(params) {
return request({
url: `/api/lesson3d/list`,
method: 'get',
params: params
});
}
//查询发布课程
export function publishedLesson3d() {
export function publishedLesson3d(params) {
return request({
url: `/api/lesson3d/paging`,
method: 'get',
params: ''
params: params
});
}
@ -39,7 +73,7 @@ export function publishLesson3d(lessonId) {
return request({
url: `/api/draft3dLesson/${lessonId}/publish`,
method: 'post',
data: ""
data: ''
});
}

View File

@ -10,7 +10,7 @@ export const meansUrl = `/api/upload/MEANS?appId=${productIdentify}`;
// export const regulationUrl = `/api/upload/regulation?appId=${productIdentify}`;
export function getUrl(relatedUrl) {
return `${process.env.VUE_APP_UPLOAD_API}${relatedUrl}`;
return `${this.$store.state.user.uploadUrl}${relatedUrl}`;
}
export function uploadFile(url, data) {

View File

@ -75,9 +75,9 @@ export default {
loading: true,
name: 'file',
size: 3,
action: `${process.env.VUE_APP_UPLOAD_API}/api/upload/PICTURE?appId=00001&appSecret=joylink00001`,
action: `${this.$store.state.user.uploadUrl}/api/upload/PICTURE?appId=00001&appSecret=joylink00001`,
response: (res) => {
return `${process.env.VUE_APP_VOICE_API}${res.data}`;
return `${this.$store.state.user.resourcesUrl}${res.data}`;
},
error: () => { that.$message.error('图片上传失败,请检查网络状态'); },
sizeError: () => { that.$message.error('图片上传失败图片大小限制3MB'); } //

View File

@ -74,7 +74,9 @@ export default {
courseDescription: 'Course description',
editCourse: 'Edit course',
createCourse: 'Create course',
courseRelease: 'Course release',
courseRelease: 'Course offonline',
courseOnline: 'Course online',
courseOffline: 'Course offonline',
releaseAssociatedCity: 'Release associated city',
releaseAssociatedMap: 'Release associated map',
trainingSequence: 'Training sequence',

View File

@ -123,6 +123,8 @@ export default {
coursePublishSuccessful: 'Successful course release',
coursePublishFailed: 'Course launch failed',
offlineSuccessful: 'Successful offline',
offlineFailed: 'Course offline',
startOperationHint: 'This operation will start the task. Do you want to continue?',
cancelsTaskHint: 'This action cancels the task. Do you want to continue?',
automaticGenerationTrainingSuccess: 'Automatic generation of training success',

View File

@ -74,6 +74,8 @@ export default {
editCourse: '编辑课程',
createCourse: '创建课程',
courseRelease: '课程发布',
courseOnline: '课程上架',
courseOffline: '课程下架',
releaseAssociatedCity: '发布关联城市:',
releaseAssociatedMap: '发布关联地图:',
trainingSequence: '实训排序',
@ -124,4 +126,3 @@ export default {
copy: '复制',
prdType:'产品类型'
};

View File

@ -123,6 +123,8 @@ export default {
trainModelNameRepeat: '列车模型数据重复',
coursePublishSuccessful: '课程发布成功',
coursePublishFailed: '课程发布失败',
offlineSuccessful: '课程下架成功',
offlineFailed: '课程下架失败',
startOperationHint: '此操作将开始任务, 是否继续?',
cancelsTaskHint: '此操作将取消任务, 是否继续?',
automaticGenerationTrainingSuccess: '自动生成实训成功',

View File

@ -1,6 +1,5 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import store from '@/store/index';
import { getToken } from '@/utils/auth';
// 定于仿真socket接口
@ -43,7 +42,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
let header = {'X-Token': getToken() };
let connectmsg = {
type:'init',
baseurl:getBaseUrl(),
baseurl:store.state.user.baseUrl,
topic:this.topic,
token:getToken(),
};
@ -364,7 +363,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
// if(data.code = "336"){
// console.log(data);
// }
if(rails.sectionrail[data.section]){
if(data.section != updateTrainModel.nowsection){
updateTrainModel.nowsection = data.section;
updateTrainModel.curve = rails.sectionrail[data.section].lineleft;
@ -522,6 +521,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
}
}else{
updateTrainModel.position.x = -100000;
}
}
@ -537,7 +540,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
trainmodel.code = data.code;
trainmodel.nowcode = data.code;
}
if(rails.sectionrail[data.section]){
//改变当前列车行驶的区段code
if(data.section != trainmodel.nowsection){
trainmodel.nowsection = data.section;
@ -797,10 +800,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
}
}
// let pos = ;
}
}
@ -1006,7 +1006,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
function signalupdate(data) {
code = data.code;
if(signallist.list[code]){
if(data.command == 'No'){
signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
@ -1072,8 +1072,11 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
}
function initswitch(data) {
code = data.code;
if(actions[code]){
if (data.command == 'NP') {
// sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset();
@ -1090,10 +1093,11 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
actions[code].command = data.command;
}
}
}
function switchupdate(data) {
code = data.code;
if (actions[code].command != data.command) {
if (actions[code].command != data.command && actions[code]) {
if (data.command == 'NP') {
// sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset();

View File

@ -20,9 +20,9 @@ import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
import { getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import { sendCommandNew } from '@/api/jmap/training';
import store from '@/store/index';
var clock = new THREE.Clock();
@ -176,7 +176,7 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
let connectmsg = {
type:'init',
baseurl:getBaseUrl(),
baseurl:store.state.user.baseUrl,
topic:'/user/queue/simulation/jl3d/'+group,
token:getToken(),
};

View File

@ -15,7 +15,7 @@ import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
import { getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import store from '@/store/index';
import { getToken } from '@/utils/auth';
import { sendCommandNew } from '@/api/jmap/training';
@ -174,7 +174,7 @@ export function Jl3dOtherVR(dom,group,skinCode) {
let connectmsg = {
type:'init',
baseurl:getBaseUrl(),
baseurl:store.state.user.baseUrl,
topic:'/user/queue/simulation/jl3d/'+group,
token:getToken(),
};

View File

@ -10,9 +10,9 @@ import { ModelManagerVR } from '@/jlmap3d/jl3dmaintainer/jl3dTrainRescue/trainre
import { VRButton } from '@/jlmap3d/jl3dmaintainer/jl3dFaultDeviceVr/utils/VRButton.js';
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import { sendCommandNew } from '@/api/jmap/training';
import store from '@/store/index';
var clock = new THREE.Clock();
@ -170,7 +170,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
let connectmsg = {
type:'init',
baseurl:getBaseUrl(),
baseurl:store.state.user.baseUrl,
topic:'/user/queue/simulation/jl3d/'+group,
token:getToken(),
};

View File

@ -2,8 +2,8 @@ import StompClient from '@/utils/sock';
// import { getTrainingCbtcDemon, runDiagramStart, runDiagramOver, setTrainingCbtcInitTime } from '@/api/simulation';
// import { creatSubscribe, clearSubscribe, displayTopic, screenTopic } from '@/utils/stomp';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import store from '@/store/index';
// 定于仿真socket接口
export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
@ -45,7 +45,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
let header = {'X-Token': getToken() };
let connectmsg = {
type:'init',
baseurl:getBaseUrl(),
baseurl:store.state.user.baseUrl,
topic:this.topic,
token:getToken(),
};
@ -325,6 +325,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
function trainrunnew(data){
let code = data.code;
if(rails.sectionrail[data.section]){
if(trainlisttest.list[code].right != data.right){
if(data.right == "0"){
@ -514,6 +515,10 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
}
}
}else{
trainlisttest.list[code].position.x = -100000;
}
}
function trainrun(data){
let code = data.code;
@ -871,6 +876,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
function signalupdate(data) {
code = data.code;
if(signallist.list[code]){
if(data.command == 'No'){
signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
@ -933,11 +939,12 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
}
}
}
function initswitch(data) {
code = data.code;
if(actions[code]){
if (data.command == 'NP') {
// sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset();
@ -953,12 +960,14 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
actions[code].action.play();
actions[code].command = data.command;
}
}
}
function switchupdate(data) {
code = data.code;
if(actions[code]){
if (actions[code].command != data.command) {
if (data.command == 'NP') {
// sectionlist.switchs.modellist[j].normal = data.normal;
@ -977,6 +986,8 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
}
}
}
}
function simulationreset(data){
for(let i=0;i<trainlisttest.group.children.length;i++){
trainlisttest.group.children[i].dispose = true;

View File

@ -1,5 +1,4 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import store from '@/store/index';

View File

@ -1,8 +1,8 @@
import { AssetModel } from '@/jlmap3d/main/loaders/model/Assetmodel';
import { Assetmaterial } from '@/jlmap3d/main/loaders/model/Assetmaterial';
import { getBaseUrl } from '@/utils/baseUrl';
import store from '@/store/index';
import { Loading } from 'element-ui';
const BASE_API = getBaseUrl();
const BASE_API = store.state.user.baseUrl;
import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
let signal5 = {

View File

@ -1,6 +1,6 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import store from '@/store/index';
import { getToken } from '@/utils/auth';
// 定于仿真socket接口
@ -45,7 +45,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
let header = {'X-Token': getToken() };
let connectmsg = {
type:'init',
baseurl:getBaseUrl(),
baseurl:store.state.user.baseUrl,
topic:this.topic,
token:getToken(),
};

View File

@ -2,7 +2,7 @@ import StompClient from '@/utils/sock';
// import { getTrainingCbtcDemon, runDiagramStart, runDiagramOver, setTrainingCbtcInitTime } from '@/api/simulation';
// import { creatSubscribe, clearSubscribe, displayTopic, screenTopic } from '@/utils/stomp';
import { getBaseUrl } from '@/utils/baseUrl'
import store from '@/store/index';
import { getToken } from '@/utils/auth';
// 定于仿真socket接口
@ -46,7 +46,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
let header = {'X-Token': getToken() };
let connectmsg = {
type:'init',
baseurl:getBaseUrl(),
baseurl:store.state.user.baseUrl,
topic:this.topic,
token:getToken(),
};
@ -165,6 +165,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
function trainRunNew(data){
let code = data.code;
if(rails.sectionrail[data.section]){
if(trainlisttest.list[code].right != data.right){
if(data.right == "0"){
@ -433,6 +434,10 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
}
}else{
trainlisttest.list[code].position.x = -1000000;
}
}
function trainrun(data){
let code = data.code;
@ -868,6 +873,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
function initswitch(data) {
code = data.code;
if(actions[code]){
if (data.command == 'NP') {
// sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset();
@ -884,9 +890,11 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
actions[code].command = data.command;
}
}
}
function switchupdate(data) {
code = data.code;
if(actions[code]){
if (actions[code].command != data.command) {
if (data.command == 'NP') {
// sectionlist.switchs.modellist[j].normal = data.normal;
@ -905,6 +913,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
}
}
}
function simulationreset(data){
for(let i=0;i<trainlisttest.group.children.length;i++){
trainlisttest.group.children[i].dispose = true;

View File

@ -1,5 +1,4 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import store from '@/store/index';

View File

@ -1,5 +1,4 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import store from '@/store/index';

View File

@ -1,5 +1,4 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import store from '@/store/index';

View File

@ -1,5 +1,4 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import store from '@/store/index';

View File

@ -1,5 +1,4 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import store from '@/store/index';

View File

@ -1,5 +1,4 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import store from '@/store/index';

View File

@ -1,6 +1,5 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import store from '@/store/index';

View File

@ -29,7 +29,6 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
// let stats = new Stats();
// dom.appendChild( stats.dom );
let scope = this;
this.dom = dom;
this.nowSceneType = "";
@ -65,6 +64,8 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
let loadingInstance = Loading.service({ fullscreen: true });
let assetModelManager = new AssetModelManager(scope,scene,controlManager);
console.log(lessonData);
assetModelManager.lessonAssetsLoader(lessonData).then((result) => {
scope.nowSceneType = lessonData.lessonProgress[0].progressScene;
animateManager.initAnimation(assetModelManager);

View File

@ -4,13 +4,9 @@ import {
import {
Assetmaterial
} from '@/jlmap3d/main/loaders/model/Assetmaterial';
import {
getBaseUrl
} from '@/utils/baseUrl';
import {
Loading
} from 'element-ui';
const BASE_API = getBaseUrl();
import {
JL3D_LOCAL_STATIC,
BASE_ASSET_API

View File

@ -142,7 +142,7 @@ export default {
// } else {
// href = 'https://joylink.club/docs';
// }
href = process.env.VUE_APP_BASE_SITE + '/docs/';
href = this.$store.state.user.baseSite + '/docs/';
window.open(href, '_blank');
},
goEmpty() {},

View File

@ -7,7 +7,7 @@ import 'nprogress/nprogress.css';
import { setToken, getToken, removeToken, getSessionStorage } from '@/utils/auth';
import { getBaseUrlByProject } from '@/api/projectServer';
import localStore from 'storejs';
import { getBaseUrl } from '@/utils/baseUrl';
import { handlerUrl } from '@/utils/baseUrl';
const whiteList = ['/login', '/design/login', '/gzzbxy/relay', '/authorization', '/AUSline', '/AUStool', '/demo', '/thirdLogin']; // 不重定向白名单
@ -90,13 +90,13 @@ router.beforeEach( async (to, from, next) => {
if (!store.state.user.baseUrl && project && loginInfo[project]) {
try {
const resp = await getBaseUrlByProject(ProjectCode[project]);
if (resp && resp.data && resp.data.domainName) {
store.dispatch('setBaseUrl', resp.data.domainName);
} else {
store.dispatch('setBaseUrl', getBaseUrl());
}
const urlData = handlerUrl(resp.data);
store.dispatch('setBaseUrl', urlData.BASE_API);
store.dispatch('setResourcesUrl', urlData.VOICE_API);
store.dispatch('setUploadUrl', urlData.UPLOAD_API);
store.dispatch('setBaseSite', urlData.BASE_SITE);
} catch (e) {
store.dispatch('setBaseUrl', getBaseUrl());
console.error(e);
}
}
document.title = loginInfo[project || 'login'] ? loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title : '';

View File

@ -60,7 +60,7 @@ export const loginInfo = {
xzexam:{
title: '城市轨道交通标准化培训软件',
loginPath: '/login?project=xzexam',
loginParam: 'DEFAULT',
loginParam: 'SAY',
loginTitle: '空串',
logoWidth: '140px',
navigationLogoWidth: '120px',
@ -729,7 +729,8 @@ export const ProjectCode = {
hls: 'DEFAULT',
designhls: 'DEFAULT',
say: 'SAY',
designsay: 'SAY'
designsay: 'SAY',
xzexam:'SAY',
};
/** 嵌入第三方平台 导航栏右上角 清空 */
export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy'];

View File

@ -21,7 +21,10 @@ const user = {
companyAdmin: false,
companyName: '',
companyProjectList: [],
baseUrl:''
baseUrl:'',
resourcesUrl: '',
uploadUrl: '',
baseSite: ''
},
mutations: {
@ -81,6 +84,15 @@ const user = {
},
setBaseUrl: (state, baseUrl) => {
state.baseUrl = baseUrl;
},
setResourcesUrl: (state, resourcesUrl) => {
state.resourcesUrl = resourcesUrl;
},
setUploadUrl: (state, uploadUrl) => {
state.uploadUrl = uploadUrl;
},
setBaseSite: (state, baseSite) => {
state.baseSite = baseSite;
}
},
@ -213,6 +225,15 @@ const user = {
setBaseUrl ({commit}, baseUrl) {
commit('setBaseUrl', baseUrl);
},
setResourcesUrl({commit}, resourcesUrl) {
commit('setResourcesUrl', resourcesUrl);
},
setUploadUrl({commit}, uploadUrl) {
commit('setUploadUrl', uploadUrl);
},
setBaseSite({commit}, baseSite) {
commit('setBaseSite', baseSite);
},
setToken({commit}, token) {
commit('SET_TOKEN', token);
}

View File

@ -1,6 +1,29 @@
export function getBaseUrl() {
import store from '@/store/index';
// 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 = 'http://114.116.51.125/jlcloud';
// // BASE_API = 'http://192.168.8.152:9000'; // 袁琪
// // BASE_API = 'http://192.168.8.172:9200'; // 旭强
// // BASE_API = 'http://192.168.8.109:9000'; // 张赛
// // BASE_API = 'http://192.168.8.140:9000'; // 杜康
// // BASE_API = 'http://b29z135112.zicp.vip';
// // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
// } else {
// BASE_API = process.env.VUE_APP_BASE_API;
// }
// return BASE_API;
// }
export function handlerUrl(data) {
let BASE_API;
let VOICE_API;
let UPLOAD_API;
let BASE_SITE;
if (process.env.NODE_ENV === 'development') {
// const data = null;
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://114.116.51.125/jlcloud';
@ -11,8 +34,31 @@ export function getBaseUrl() {
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
} else {
BASE_API = process.env.VUE_APP_BASE_API;
// BASE_API = data && data.domainName ? 'https://' + data.domainName : BASE_API;
BASE_API = data && data.domainName ? 'http://' + data.domainName : BASE_API;
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
UPLOAD_API = 'http://joylink.club/jlfile';
BASE_SITE = 'https://test.joylink.club/cbtc';
} else if (process.env.NODE_ENV === 'test') {
BASE_API = data && data.domainName ? 'https://' + data.domainName : 'https://test.joylink.club/jlcloud';
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
UPLOAD_API = 'http://joylink.club/jlfile';
BASE_SITE = 'https://test.joylink.club/cbtc';
} else if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_PRO === 'local') {
BASE_API = 'http://160.20.60.15:9000';
VOICE_API = 'http://160.20.60.15/oss/joylink';
UPLOAD_API = 'http://160.20.60.15';
BASE_SITE = 'http://160.20.60.15';
} else if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_PRO === 'ntyl') {
BASE_API = 'https://joylink.club/jlcloud';
VOICE_API = 'https://joylink.club/oss/joylink';
UPLOAD_API = 'http://joylink.club/jlfile';
BASE_SITE = 'https://joylink.club/cbtc';
} else if (process.env.NODE_ENV === 'production') {
BASE_API = data && data.domainName ? 'https://' + data.domainName : 'https://joylink.club/jlcloud';
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
UPLOAD_API = 'http://joylink.club/jlfile';
BASE_SITE = 'https://joylink.club/cbtc';
}
return BASE_API;
return {BASE_API, VOICE_API, UPLOAD_API, BASE_SITE};
}

View File

@ -1,9 +1,9 @@
import Vue from 'vue';
import { getBaseUrl } from '@/utils/baseUrl';
import store from '@/store/index';
// 创建或者打开数据库
export function openIndexedDB() {
const baseUrl = getBaseUrl();
const baseUrl = store.state.user.baseUrl;
const indexedDBName = baseUrl.replace(/http.?:\/\/(.*)[\/|:].*/, '$1');
const request = window.indexedDB.open(indexedDBName, 1);
request.onerror = function (event) {

View File

@ -4,17 +4,17 @@ import qs from 'qs';
import { i18n } from '@/main.js';
import { MessageBox } from 'element-ui';
import { getToken } from '@/utils/auth';
import { getBaseUrl } from '@/utils/baseUrl';
import { handlerUrl } from '@/utils/baseUrl';
import { EventBus } from '@/scripts/event-bus';
import ConstConfig from '@/scripts/ConstConfig';
import Vue from 'vue';
import router from '../router/index';
const BASE_API = getBaseUrl();
const urlData = handlerUrl();
// 创建axios实例
const service = axios.create({
baseURL: BASE_API, // api的base_url
baseURL: urlData.BASE_API, // api的base_url
withCredentials: true, // 跨域请求时是否需要使用凭证
timeout: 600000 // 请求超时时间
});

View File

@ -1,16 +1,15 @@
import { getToken } from '@/utils/auth';
import { checkLoginLine } from '@/api/login';
import { getBaseUrl } from '@/utils/baseUrl';
import { MessageBox } from 'element-ui';
import store from '@/store/index';
import Stomp from 'stompjs';
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
const websocketUrl = `${getBaseUrl()}/joylink-websocket?token=`;
const reconnectInterval = [1000, 3000, 5000, 10000, 30000, 60000];
var StompClient = function (headers) {
const websocketUrl = `${store.state.user.baseUrl}/joylink-websocket?token=`;
this.url = websocketUrl + getToken();
this.headers = headers || {};
this.subscribeMap = new Map(); // 已订阅,对象{dest:'', handler:function, sub: Object}

View File

@ -95,7 +95,7 @@ export default {
resultMap: {},
loading: false,
audioPlayId: '',
baseUrl:process.env.VUE_APP_VOICE_API
baseUrl:this.$store.state.user.resourcesUrl
};
},
watch: {

View File

@ -84,7 +84,7 @@ export default {
recordSendingId: null,
audioDataMap: {},
audioPlayId: '',
baseUrl:process.env.VUE_APP_VOICE_API
baseUrl:this.$store.state.user.resourcesUrl
};
},
watch: {

View File

@ -26,7 +26,7 @@ export default {
}, //
computed: {
action() {
return `${process.env.VUE_APP_UPLOAD_API}${pictureUrl}`;
return `${this.$store.state.user.uploadUrl}${pictureUrl}`;
},
draft() {
return this.$route.query.draft;
@ -56,7 +56,7 @@ export default {
});
uploadFile(action, that.formData).then(resp => {
const imgUrl = process.env.VUE_APP_VOICE_API + resp.data;
const imgUrl = this.$store.state.user.resourcesUrl + resp.data;
insertImgFn(imgUrl);
}).catch(error => { console.log(error); });
};

View File

@ -590,6 +590,7 @@ export default {
},
updatetrainlist(){
getSimulationTrainlistNew(this.group).then(netdata => {
console.log(netdata);
this.options = [];
this.trainlist = netdata.data;
for(let i=0;i<netdata.data.length;i++){

View File

@ -0,0 +1,85 @@
<template>
<div id="" class="lessondeletediv" v-show="showDelete">
<div style="text-align:center;top:10%;font-size:30px">确认是否删除</div>
<el-form ref="form" >
<el-form-item style="text-align:center;margin-left: 0px;margin-top: 5%;" >
<el-button type="primary" @click="onSubmit">删除</el-button>
<el-button @click="unSubmit" >取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import Vue from 'vue';
import localStore from 'storejs';
export default {
name: 'LessonDelete',
components: {
},
data() {
return {
showDelete:false,
deleteId:'',
}
},
computed: {
},
watch: {
},
mounted() {
},
beforeDestroy() {
},
methods: {
deleteView(id){
if(this.showDelete == false){
this.showDelete = true;
this.deleteId = id;
}else{
this.showDelete = false;
}
},
onSubmit() {
this.showDelete = false;
this.$emit('lessonDelete',this.deleteId);
},
unSubmit(){
this.showDelete = false;
},
},
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.lessondeletediv {
position: absolute;
width: 20%;
height: 10%;
top:45%;
left:40%;
background-color: #fff;
border-radius: 18px;
border:solid 2px #000;
z-index: 5;
}
</style>

View File

@ -71,9 +71,6 @@
}
},
onSubmit() {
console.log(this.form.scene);
console.log(this.form.role);
console.log('submit!');
this.showSetup = false;
this.$emit('lessonCreate', { name: this.form.name, type: this.form.type });
},

View File

@ -302,6 +302,7 @@
saveData.setup.examMode = this.examMode;
saveData.setup.checkedRole = this.checkedRole;
console.log(saveData);
this.netData.data = JSON.stringify(saveData);
// console.log();
updateLesson3dData(this.$route.query.lessonId,this.netData).then(data => {

View File

@ -144,7 +144,7 @@
import { JobPaneData } from '@/jlmap3d/lesson3d/toolsmodel/jobpanedata.js';
import { ZzwwTrain } from '@/jlmap3d/lesson3dedit/toolsmodel/zzwwtrain.js';
import { getLesson3dData,updateLesson3dData } from '@/api/jmap/lesson3d';
import { getLesson3dData,updateLesson3dData,getPublishLesson3dData} from '@/api/jmap/lesson3d';
import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
@ -248,15 +248,77 @@
window.startLesson = this.startLesson;
window.updataExamStatus = this.updataExamStatus;
window.lessonEnd = this.lessonEnd;
this.init(this.$route.query.lessonId);
console.log(this.$route.query.lessonType);
if(this.$route.query.lessonType == "publish"){
this.initPublish(this.$route.query.lessonId);
}else{
this.initDraft(this.$route.query.lessonId);
}
},
beforeDestroy() {
},
methods: {
init(lessonId){
initDraft(lessonId){
getLesson3dData(lessonId).then(data => {
console.log(data);
this.netData.name = data.data.name;
this.netData.type = data.data.type;
let dom = document.getElementById('lesson3ddraw');
this.lessonData = new LessonData();
this.jobPaneData = new JobPaneData();
this.trainDeviceData = new ZzwwTrain();
let loadData;
if(data.data.data){
this.lessonMsg = {
lessonTittle:data.data.name,
userId:data.data.userId,
userJob:"",
};
loadData = JSON.parse(data.data.data);
if(this.$route.query.examMode == 1){
this.examMode = true;
}else{
this.examMode = loadData.setup.examMode;
}
if(loadData.setup.checkedRole.length == 0){
this.showSelectJob = false;
}
this.selectJobList = loadData.setup.checkedRole;
this.jobPaneData.dataList = loadData.toolJobPane;
this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
this.lessonTools = loadData.lessonTools;
this.lessonData.loadLessonProgress(loadData.lessonProgress);
if(this.lessonTools[5]){
loadData.trainDeviceData = this.trainDeviceData.deviceList;
}else{
this.lessonTools[5] = {
name:"大铁车检组件",
type:"",
isShow:false,
};
}
}else{
this.lessonData.initLessonProgress();
this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
this.jl3d.initNowRole();
}
// console.log("loaddata----------------");
// console.log(loadData);
// console.log(this.lessonMsg);
this.jl3d = new Lesson3dPlayer(dom,loadData,this.lessonPlayIndex);
}).catch(() => {
});
},
initPublish(lessonId){
getPublishLesson3dData(lessonId).then(data => {
console.log(data);
this.netData.name = data.data.name;
this.netData.type = data.data.type;

View File

@ -1,6 +1,6 @@
<template>
<div class="explainpanediv"
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex]"
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex] && lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.text != ''"
:style="{'background-image': 'url('+lessonbg+')'}">
<div class="explainpanetittle" >

View File

@ -2,7 +2,7 @@
<div class="stepstipsdiv"
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex]"
:style="{'background-image': 'url('+lessonbg+')'}">
<div class="stepstipstittle" >
<div class="stepstipstittle" v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.text != ''">
当前情况
<!-- {{lessonData.lessonData.lessonProgress[lessonPlayIndex].stepTipsData.tittle}} -->
</div>

View File

@ -2,46 +2,56 @@
<div class="jl3dmap3dMaintainer">
<div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}">
<div style="position:absolute;left:25%;top:10%;font-size:80px;">
<div style="position:absolute;width:50%;left:25%;top:10%;text-align:center;font-size:80px;">
<el-row>
城市轨道交通标准化培训软件
</el-row>
<el-row style="font-size:40px;">
课程模式选择:
<el-switch
v-model="examMode"
active-text="考试模式"
inactive-text="教学模式">
</el-switch>
</el-row>
</div>
<div style="width:40%;height:70%;position:absolute;left:30%;top:25%;font-size:30px">
<el-table
:data="lessonData"
style="width: 100%;"
highlight-current-row
max-height="700"
>
<el-table-column
label="课程名称"
prop="name">
</el-table-column>
<el-table-column
align="right">
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/ck.png)'}"
style="left:15%;top:25%;" @click=""></div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/hk.png)'}"
style="left:40%;top:25%;" @click=""></div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/jy.png)'}"
style="left:65%;top:25%;" @click="enterPlayer(32)"></div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/yx.png)'}"
style="left:15%;top:60%;" @click=""></div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/zf.png)'}"
style="left:40%;top:60%;" @click=""></div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/xr51.png)'}"
style="left:65%;top:60%;" @click=""></div>
<template slot-scope="scope">
<el-button
size="mini"
@click="goDetail(scope.row)">进入课程</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="display-draft">
<el-button-group>
<el-button style="width:200px"type="primary" @click="quit">退出</el-button>
</el-button-group>
</div>
</div>
</div>
</template>
<script>
import { getSelectLesson3dList } from '@/api/jmap/lesson3d';
import { ProjectIcon } from '@/scripts/ProjectConfig';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
import bgPsdImg from '@/assets/bg_psd.png';
@ -57,7 +67,14 @@ export default {
data() {
return {
localStatic:JL3D_LOCAL_STATIC,
examMode:false,
lessonType:'publish',
lessonData:[],
search: '',
};
},
beforeDestroy() {
@ -66,17 +83,20 @@ export default {
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
},
mounted() {
getSelectLesson3dList().then(response => {
console.log(response);
this.lessonData = response.data;
}).catch(() => {
});
// console.log("");
},
methods: {
enterPlayer:function (id) {
// this.$router.push({ path: '/jlmap3d/lcjy', query: {} });
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId:id} });
goDetail( row) {
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId: row.id,lineCode: this.$route.query.lineCode,examMode:this.examMode,lessonType:this.lessonType} });
},
quit() {
history.go(-1);
},
}
};
</script>
@ -106,22 +126,15 @@ export default {
background-size:100%;
}
.lesson3dSelectButton{
position:absolute;
width: 20%;
height: 30%;
position:absolute;
.display-draft {
/* z-index: 1000; */
position: absolute;
width:100%;
text-align: center;
font-size: 50px;
line-height:150px;
background-size: 100%;
background-repeat: no-repeat;
color:#FFF;
cursor:pointer;
bottom: 50px;
}
</style>

View File

@ -1,24 +1,40 @@
<template>
<div class="joylink-card">
<div class="lesson-header">
<div class="lesson-list">草稿{{ $t('lesson.courseList') }}</div>
<div class="joylink-card">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="草稿数据管理" name="first">
<div class="but-group">
<el-button size="mini" type="primary" @click="lessonSetupCreate">{{ $t('lesson.newConstruction') }}</el-button>
</div>
<QueryListPage ref="queryListPageCourse" :card-padding="50" :query-form="queryFormCourse" :pager-config="pagerConfigCourse" :query-list="queryListCourse" style="width: 91%;margin-left:4%;margin-top:20px;" />
</el-tab-pane>
<el-tab-pane label="发布数据管理" name="second">
<QueryListPage ref="queryListPage" :card-padding="50" :query-form="queryFormPublish" :pager-config="pagerConfigPublish" :query-list="queryListPublish" style="width: 91%;margin-left:4%;margin-top:20px;" />
</el-tab-pane>
</el-tabs>
</div>
<QueryListPage ref="queryListPage" :card-padding="50" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<publish-create ref="publishCreate" @refresh="refresh" />
<publish-lesson ref="publishLesson" @refresh="refresh" />
<lesson-detail ref="lessonDetail" />
<Lesson-Setup ref="lessonsetup" @lessonCreate="lessonCreate"></Lesson-Setup>
<Lesson-Delete ref="lessondelete" @lessonDelete="lessonDelete"></Lesson-Delete>
</div>
</template>
<script>
// import { releaseOrCancel } from '@/api/lesson3d';
import { getLesson3dDrftList,createLesson3d,updateLesson3dBasic,delLesson3d,publishLesson3d } from '@/api/jmap/lesson3d';
import { getLesson3dDrftList,createLesson3d,updateLesson3dBasic,delLesson3d,publishedLesson3d,publishLesson3d,onlineLesson3d,offlineLesson3d } from '@/api/jmap/lesson3d';
// import { delLesson } from '@/api/jmap/lesson3d';
@ -30,26 +46,37 @@ import ConstConfig from '@/scripts/ConstConfig';
import LessonSetup from '@/views/jlmap3d/lesson3dedit/component/lessonsetup';
import LessonDelete from '@/views/jlmap3d/lesson3dedit/component/lessondelete';
export default {
name: 'Lesson3d',
components: {
PublishCreate,
PublishLesson,
LessonDetail,
LessonSetup
LessonSetup,
LessonDelete
},
data() {
return {
loading: false,
pagerConfig: {
activeName: 'first',
pagerConfigCourse: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
pagerConfigPublish: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryFormCourse: {
show: false
},
queryList: {
query: this.queryFunction,
queryFormPublish: {
show: false
},
queryListCourse: {
query: this.queryFunctionCourse,
selectCheckShow: false,
indexShow: true,
columns: [
@ -84,14 +111,13 @@ export default {
}
},
{
name: this.$t('lesson.notRelease'),
name: this.$t('lesson.courseRelease'),
handleClick: this.release,
type: 'primary',
showControl: (row) => {
return row.status !== '1';
}
},
{
name: this.$t('global.delete'),
handleClick: this.deleteLesson,
@ -104,7 +130,56 @@ export default {
]
}
]
},
queryListPublish: {
query: this.queryFunctionPublish,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '三维课程名称',
prop: 'name'
},
{
title: '三维课程类型',
prop: 'type'
},
{
title: '创建人',
prop: 'userId'
},
{
title: '创建时间',
prop: 'createTime'
},
{
type: 'button',
title: this.$t('global.operate'),
width: '400',
buttons: [
{
name: this.$t('lesson.courseOnline'),
handleClick: this.online,
type: 'primary',
showControl: (row) => {
return row.status !== '1';
}
},
{
name: this.$t('lesson.courseOffline'),
handleClick: this.offonline,
type: 'primary',
showControl: (row) => {
return row.status !== '1';
}
},
]
}
]
},
};
},
@ -128,9 +203,12 @@ export default {
mounted() {
},
methods: {
queryFunction(params) {
queryFunctionCourse(params) {
return getLesson3dDrftList(params);
},
queryFunctionPublish(params) {
return publishedLesson3d(params);
},
handlerStatus(row) {
let lessonStatus = '';
switch (row.status) {
@ -149,8 +227,11 @@ export default {
}
return lessonStatus;
},
handleClick(tab, event) {
// console.log(tab, event);
},
refresh() {
this.$refs.queryListPage.refresh(true);
this.$refs.queryListPageCourse.refresh(true);
},
lessonSetupCreate() {
this.$refs.lessonsetup.setupView();
@ -168,16 +249,8 @@ export default {
});
},
publish(index, row) {
row.mapId = this.$route.params.mapId;
row.cityCode = this.$route.query.cityCode;
this.$refs.publishLesson.doShow(row);
},
deleteLesson(index, row) {
// console.log(row);
delLesson3d(row.id).then(response => {
lessonDelete(deleteId){
delLesson3d(deleteId).then(response => {
this.$message.success(this.$t('tip.successfullyDelete'));
this.loading = true;
this.refresh();
@ -186,9 +259,46 @@ export default {
this.$messageBox(this.$t('tip.failDelete'));
});
},
publish(index, row) {
row.mapId = this.$route.params.mapId;
row.cityCode = this.$route.query.cityCode;
this.$refs.publishLesson.doShow(row);
},
deleteLesson(index, row) {
this.$refs.lessondelete.deleteView(row.id);
// console.log(row);
release(){
},
release(index, row){
publishLesson3d(row.id).then(response => {
this.$message.success(this.$t('tip.coursePublishSuccessful'));
this.loading = true;
this.refresh();
this.loading = false;
}).catch(() => {
this.$messageBox(this.$t('tip.coursePublishFailed'));
});
},
online(index, row){
onlineLesson3d(row.id).then(response => {
this.$message.success(this.$t('tip.coursePublishSuccessful'));
this.loading = true;
this.refresh();
this.loading = false;
}).catch(() => {
this.$messageBox(this.$t('tip.coursePublishFailed'));
});
},
offonline(index, row){
offlineLesson3d(row.id).then(response => {
this.$message.success(this.$t('tip.offlineSuccessful'));
this.loading = true;
this.refresh();
this.loading = false;
}).catch(() => {
this.$messageBox(this.$t('tip.offlineFailed'));
});
},
goDetail(index, row) {
console.log(row);

View File

@ -204,7 +204,7 @@ export default {
},
avatarUrl(val) {
if (val && val.creatorAvatarPath) {
return process.env.VUE_APP_VOICE_API + val.creatorAvatarPath;
return this.$store.state.user.resourcesUrl + val.creatorAvatarPath;
} else {
return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png';
}

View File

@ -84,7 +84,7 @@ export default {
// yuyin:yuyin,
currentAudioIndex:0,
isPlay:false,
baseUrl:process.env.VUE_APP_VOICE_API
baseUrl: this.$store.state.user.resourcesUrl
};
},
watch:{

View File

@ -7,7 +7,7 @@
</template>
<script>
import { getCompanyListPaging, deleteCompany } from '@/api/company';
import { getCompanyListPaging, deleteCompany, getCompanyQrCode } from '@/api/company';
import EditCompany from './add';
import QrCode from '@/components/QrCode';
import { ProjectList } from '@/scripts/ProjectConfig';
@ -126,15 +126,20 @@ export default {
this.$router.push({ path: `/system/companyManage/orgDetail`, query: { orgId: row.id } });
},
handleGenerateQrCode(index, row) {
let state = 2;
if (process.env.NODE_ENV === 'production') {
state = 3;
}
// let state = 2;
// if (process.env.NODE_ENV === 'production') {
// state = 3;
// }
getCompanyQrCode(row.id).then(resp => {
const param = {
url: `https://joylink.club/oss/joylink/company?state=${state}_${row.id}`,
url: resp.data,
title: '单位二维码'
};
this.$refs.qrCode.doShow(param);
}).catch(() => {
this.$message.error('获取单位二维码失败!');
});
}
}
};

View File

@ -94,7 +94,7 @@ export default {
return this.projectMap[getSessionStorage('project')];
},
projectList() {
return [{value: 'default', label: '默认'}, ...ProjectList];
return [{value: 'default', label: '默认'}, { value: 'test', label: '测试' }, ...ProjectList];
}
},
mounted() {

View File

@ -57,7 +57,7 @@ export default {
},
computed: {
action() {
return `${process.env.VUE_APP_UPLOAD_API}${meansUrl}`;
return `${this.$store.state.user.uploadUrl}${meansUrl}`;
},
form() {
const form = {

View File

@ -1,6 +1,5 @@
// importScripts('sockjs.js');
// import { getToken } from '@/utils/auth';
// import { getBaseUrl } from '@/utils/baseUrl';
// import SockJS from 'sockjs-client';
// const websocketUrl = 'ws://test.joylink.club/jlcloud/joylink-websocket?token=';

View File

@ -1,6 +1,5 @@
// importScripts('sockjs.js');
// import { getToken } from '@/utils/auth';
// import { getBaseUrl } from '@/utils/baseUrl';
// import SockJS from 'sockjs-client';
// const websocketUrl = 'ws://test.joylink.club/jlcloud/joylink-websocket?token=';

View File

@ -1,6 +1,5 @@
// importScripts('sockjs.js');
// import { getToken } from '@/utils/auth';
// import { getBaseUrl } from '@/utils/baseUrl';
// import SockJS from 'sockjs-client';
// const websocketUrl = 'ws://test.joylink.club/jlcloud/joylink-websocket?token=';

View File

@ -1,6 +1,5 @@
// importScripts('sockjs.js');
// import { getToken } from '@/utils/auth';
// import { getBaseUrl } from '@/utils/baseUrl';
// import SockJS from 'sockjs-client';
// const websocketUrl = 'ws://test.joylink.club/jlcloud/joylink-websocket?token=';

View File

@ -1,6 +1,5 @@
// importScripts('sockjs.js');
// import { getToken } from '@/utils/auth';
// import { getBaseUrl } from '@/utils/baseUrl';
// import SockJS from 'sockjs-client';
// const websocketUrl = 'ws://test.joylink.club/jlcloud/joylink-websocket?token=';

View File

@ -1,6 +1,5 @@
// importScripts('sockjs.js');
// import { getToken } from '@/utils/auth';
// import { getBaseUrl } from '@/utils/baseUrl';
// import SockJS from 'sockjs-client';
// const websocketUrl = 'ws://test.joylink.club/jlcloud/joylink-websocket?token=';

View File

@ -1,6 +1,5 @@
// importScripts('sockjs.js');
// import { getToken } from '@/utils/auth';
// import { getBaseUrl } from '@/utils/baseUrl';
// import SockJS from 'sockjs-client';
// const websocketUrl = 'ws://test.joylink.club/jlcloud/joylink-websocket?token=';