Merge remote-tracking branch 'origin/test'

This commit is contained in:
thesai 2021-07-30 22:02:58 +08:00
commit 0361281d71
13 changed files with 390 additions and 81 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -305,10 +305,36 @@ export function JLmap3dEdit(dom, data, mapid) {
for(let i=0,leni=scope.mapdata.stationstandlist.list.length;i<leni;i++){ for(let i=0,leni=scope.mapdata.stationstandlist.list.length;i<leni;i++){
if(changeStation.code == scope.mapdata.stationstandlist.list[i].code){ if(changeStation.code == scope.mapdata.stationstandlist.list[i].code){
let changeData = scope.mapdata.stationstandlist.list[i]; let changeData = scope.mapdata.stationstandlist.list[i];
console.log(changeData);
let topStandTrack = scope.mapdata.sectionlist.sections.datalist[changeData.stands[0].section]; let topStandTrack = scope.mapdata.sectionlist.sections.datalist[changeData.stands[0].section];
let downStandTrack = scope.mapdata.sectionlist.sections.datalist[changeData.stands[changeData.stands.length-1].section]; let downStandTrack = scope.mapdata.sectionlist.sections.datalist[changeData.stands[changeData.stands.length-1].section];
changeStation.position.set(topStandTrack.railpoint[0].x+(topStandTrack.leftStopPointOffset+topStandTrack.rightStopPointOffset)/2,topStandTrack.railpoint[1].y,(topStandTrack.railpoint[1].z+downStandTrack.railpoint[1].z)/2);
console.log(scope.mapdata.sectionlist.sections);
console.log(topStandTrack.mesh.railpoint[0].x);
console.log(topStandTrack.mesh.railpoint[2].x);
console.log(downStandTrack.mesh.railpoint[0].x);
console.log(downStandTrack.mesh.railpoint[2].x);
let rightpos = topStandTrack.leftStopPercent*(topStandTrack.mesh.railpoint[2].x -topStandTrack.mesh.railpoint[0].x)+topStandTrack.mesh.railpoint[0].x;
let leftpos = downStandTrack.rightStopPercent*(downStandTrack.mesh.railpoint[2].x -downStandTrack.mesh.railpoint[0].x)+downStandTrack.mesh.railpoint[0].x;
let rightX = changeData.mesh.position.x-63.4 - rightpos;
let leftX = changeData.mesh.position.x+63.4 - leftpos;
console.log("----------------------------");
console.log(rightpos);
console.log(leftpos);
console.log("----------------------------");
console.log(rightX);
console.log(leftX);
topStandTrack.mesh.position.x = topStandTrack.mesh.position.z + rightX;
downStandTrack.mesh.position.x = downStandTrack.mesh.position.x + leftX;
//
// // changeStation.position.set(topStandTrack.railpoint[0].x+(topStandTrack.leftStopPointOffset+topStandTrack.rightStopPointOffset)/2,topStandTrack.railpoint[1].y,(topStandTrack.railpoint[1].z+downStandTrack.railpoint[1].z)/2);
topStandTrack.mesh.railpoint[0].x = topStandTrack.mesh.railpoint[0].x+rightX;
topStandTrack.mesh.railpoint[2].x = topStandTrack.mesh.railpoint[2].x+rightX;
downStandTrack.mesh.railpoint[0].x = downStandTrack.mesh.railpoint[0].x+leftX;
downStandTrack.mesh.railpoint[2].x = downStandTrack.mesh.railpoint[2].x+leftX;
} }
} }
} }

View File

@ -5,7 +5,7 @@
<!--<div class="holdTrainStatus">H</div>--> <!--<div class="holdTrainStatus">H</div>-->
<!--<div class="jumpStopStatus">S</div>--> <!--<div class="jumpStopStatus">S</div>-->
<!--</div>--> <!--</div>-->
<station-control-convert ref="stationControlConvert" /> <station-control-convert ref="stationControlConvert" @warningInfoDoShow="warningInfoDoShow" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" /> <password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" /> <view-train-id ref="viewTrainId" />
<view-name ref="viewName" /> <view-name ref="viewName" />
@ -15,6 +15,7 @@
<train-delete ref="trainDelete" /> <train-delete ref="trainDelete" />
<manage-user ref="manageUser" /> <manage-user ref="manageUser" />
<help-about ref="helpAbout" /> <help-about ref="helpAbout" />
<warning-info ref="warningInfo" />
<!-- <delete-runplan-line ref="deleteRunplanLine" /> --> <!-- <delete-runplan-line ref="deleteRunplanLine" /> -->
<!-- <add-runplan-line ref="addRunplanLine" /> --> <!-- <add-runplan-line ref="addRunplanLine" /> -->
</div> </div>
@ -23,6 +24,7 @@
import MenuBar from '@/jmapNew/theme/components/menus/menuBar'; import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
import StationControlConvert from './menuDialog/stationControlConvert'; import StationControlConvert from './menuDialog/stationControlConvert';
import WarningInfo from './menuDialog/warningInfo';
import TrainAdd from './menuDialog/trainAdd'; import TrainAdd from './menuDialog/trainAdd';
// import AddRunplanLine from './menuDialog/addRunplanLine'; // import AddRunplanLine from './menuDialog/addRunplanLine';
import TrainTranstalet from './menuDialog/trainTranstalet'; import TrainTranstalet from './menuDialog/trainTranstalet';
@ -50,7 +52,8 @@ export default {
TrainTranstalet, TrainTranstalet,
TrainDelete, TrainDelete,
ManageUser, ManageUser,
HelpAbout HelpAbout,
WarningInfo
// DeleteRunplanLine // DeleteRunplanLine
}, },
props: { props: {
@ -484,6 +487,9 @@ export default {
blankClickClose() { blankClickClose() {
this.$refs.menuBar.doClose(); this.$refs.menuBar.doClose();
}, },
warningInfoDoShow(info) {
this.$refs.warningInfo.doShow(info);
},
undeveloped() { undeveloped() {
this.$refs.menuBar.doClose(); this.$refs.menuBar.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), { this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {

View File

@ -153,6 +153,12 @@ export default {
'$store.state.map.controlTransfer':function (controlTransferList) { '$store.state.map.controlTransfer':function (controlTransferList) {
controlTransferList.forEach(controlTransfer=>{ controlTransferList.forEach(controlTransfer=>{
this.updateTableValue(controlTransfer); this.updateTableValue(controlTransfer);
if (controlTransfer.applicantId && this.$store.state.training.memberData[controlTransfer.applicantId] &&
this.$store.state.training.memberData[controlTransfer.applicantId].userId == this.$store.state.user.id &&
this.$store.state.training.prdType === '01'
) {
this.$emit('warningInfoDoShow', controlTransfer);
}
}); });
}, },
// //
@ -164,7 +170,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.loadTableData(); // this.loadTableData();
}, },
methods: { methods: {
updateTableValue(controlTransfer) { updateTableValue(controlTransfer) {
@ -241,15 +247,37 @@ export default {
} }
}, },
initTableDataStatus() { initTableDataStatus() {
this.tableData.forEach(row => { this.tableData = [];
row.disabled = this.checkBoxDisabled(row); if (this.$store.state.training.prdType === '02') {
row.check = false; this.stationList && this.stationList.forEach(station => {
row.result = ''; if (station.createControlMode) {
const control = this.$store.getters['map/getDeviceByCode'](row.code); const control = this.$store.getters['map/getDeviceByCode'](station.code);
if (control) { this.tableData.push({
row.control = this.controlProps[control.controlMode]; code: station.code,
} operate: station.name || '',
}); control: control ? this.controlProps[control.controlMode] : '',
check: false,
disabled: this.checkBoxDisabled(station),
status: '正常',
result: ''
});
}
});
} else if (this.$store.state.training.prdType === '01') {
const stationCodeList = this.$store.state.map.stationControlMap[this.$store.state.training.roleDeviceCode];
stationCodeList && stationCodeList.forEach(stationCode => {
const station = this.$store.getters['map/getDeviceByCode'](stationCode);
this.tableData.push({
code: station.code,
operate: station.name || '',
control: station ? this.controlProps[station.controlMode] : '',
check: false,
disabled: this.checkBoxDisabled(station),
status: '正常',
result: ''
});
});
}
}, },
doShow(operate) { doShow(operate) {
if (!this.dialogShow) { if (!this.dialogShow) {

View File

@ -0,0 +1,105 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm station-control-convert"
title="0级报警详细信息"
:visible.sync="show"
width="900px"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="font-size: 14px;color: #000;">
<el-row>
<el-col :span="8" style="display: flex;">
<div>线路名称</div>
<div style="width: 180px;" class="border-style">{{ $store.state.map.mapName }}</div>
</el-col>
<el-col :span="8" style="display: flex;">
<div>单位名称</div>
<div style="width: 180px;" class="border-style">{{ stationName }}</div>
</el-col>
<el-col :span="8" style="display: flex;">
<div>模块名称</div>
<div style="width: 180px;" class="border-style">CMM控制模式转换模块</div>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="8" style="display: flex;">
<div>报警时间</div>
<div style="width: 180px;" class="border-style">{{ time }}</div>
</el-col>
<el-col :span="8" style="display: flex;">
<div>&#12288&#12288</div>
<div style="width: 180px;" class="border-style">0级告警</div>
</el-col>
<el-col :span="8" style="display: flex;">
<div>确认状态</div>
<div style="width: 180px;" class="border-style">未确认</div>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="12" style="display: flex;">
<div>&#12288&#12288</div>
<div style="width: 325px;" class="border-style">系统事件</div>
</el-col>
<el-col :span="12" style="display: flex;">
<div>&#8194&#8194</div>
<div style="width: 325px;" class="border-style">依据信号设备操作命令设置控制模式</div>
</el-col>
</el-row>
<el-row style="display: flex;margin-top: 10px;">
<div>事件摘要</div>
<div style="width: 760px;" class="border-style">控制模式转换</div>
</el-row>
<el-row style="display: flex;margin-top: 10px;">
<div>推荐操作</div>
<div style="width: 760px;" class="border-style" />
</el-row>
<el-row style="margin-top: 10px;">
<span>报警详细描述</span>
<div style="width: 825px;margin-left: 0;height: 80px;" class="border-style">{{ `控制模式转换:${stationName}由中控模式转为站控模式!` }}</div>
</el-row>
<div style="text-align: center;margin-top: 10px;">
<el-button @click="doClose">确认</el-button>
<span>未确认0级报警数目1</span>
</div>
</div>
</el-dialog>
</template>
<script>
import { parseTime } from '@/utils/index';
export default {
name: 'WarningInfo',
data() {
return {
show: false,
stationName: '',
time: ''
};
},
methods: {
doClose() {
this.show = false;
},
doShow(info) {
const station = this.$store.getters['map/getDeviceByCode'](info.code);
this.stationName = station.name;
this.time = parseTime(this.$store.state.training.initTime);
this.show = true;
}
}
};
</script>
<style scoped>
.border-style {
border-top: 2px solid #858585;
border-left: 2px solid #858585;
border-right: 2px solid #F2F2F2;
border-bottom: 2px solid #F2F2F2;
padding: 0 10px;
margin-left: 10px;
}
</style>

View File

@ -246,7 +246,8 @@ const map = {
controlTransfer:[], // 控制权转移消息 controlTransfer:[], // 控制权转移消息
mapDataParseCount: 0, mapDataParseCount: 0,
foldLineMap: {}, // 现地折行线map数据 foldLineMap: {}, // 现地折行线map数据
clearButtonCount: 0 // 清除操作按钮计数器 clearButtonCount: 0, // 清除操作按钮计数器
stationControlMap: {} // 站控显示的map { 当前车站:显示车站列表 }
}, },
getters: { getters: {
@ -718,6 +719,18 @@ const map = {
state.foldLineMap = foldLineMap; state.foldLineMap = foldLineMap;
const parser = parserFactory(ParserType.Graph.value); const parser = parserFactory(ParserType.Graph.value);
state.mapDevice = parser.parser(map, map.skinVO.code, showConfig); state.mapDevice = parser.parser(map, map.skinVO.code, showConfig);
state.stationControlMap = {};
map.stationList.forEach(station => {
if (station.ciStation) {
const centrailzedList = [station.code];
station.relStationCodeList.forEach(relStationCode => {
state.stationControlMap[relStationCode] = centrailzedList;
if (state.mapDevice[relStationCode].centralized) {
centrailzedList.push(relStationCode);
}
});
}
});
Vue.prototype.$jlmap && Vue.prototype.$jlmap.setMapDevice(state.mapDevice); Vue.prototype.$jlmap && Vue.prototype.$jlmap.setMapDevice(state.mapDevice);
} else { } else {
state.map = null; state.map = null;

View File

@ -2,11 +2,11 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.2.175:9000'; // 旭强 有线 // BASE_API = 'http://192.168.2.175:9000'; // 旭强 有线
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线 // BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
// BASE_API = 'http://192.168.2.183:9000'; // 张赛 BASE_API = 'http://192.168.2.183:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -242,7 +242,7 @@
console.log(error); console.log(error);
}) })
,200,true); ,200,true);
updatemmic1(this.move); // updatemmic1(this.move);
}, },
speedend: function(event){ speedend: function(event){
document.getElementById("div1").onmousemove = null; document.getElementById("div1").onmousemove = null;

View File

@ -27,7 +27,7 @@
</div> </div>
<div class = "right"> <div class = "right">
<div class = "rightstatus narea n-tiaoting" :style="{backgroundImage: 'url(' + nimage + ')' }"> <div class = "rightstatus narea n-tiaoting" :style="{backgroundImage: 'url(' + tiaotingimage + ')' }">
</div> </div>
<div class = "rightstatus darea d-info" :style="{backgroundImage: 'url(' + dimage + ')' }"> <div class = "rightstatus darea d-info" :style="{backgroundImage: 'url(' + dimage + ')' }">
</div> </div>
@ -111,11 +111,13 @@ export default {
nowspeed:0, nowspeed:0,
nowatpspeed:0, nowatpspeed:0,
nowatospeed:0, nowatospeed:0,
oldspeed:0,
endstation:'', endstation:'',
nextstation:'', nextstation:'',
mmimodel:null, mmimodel:null,
nstate:"tiaoting", tiaotingjump:"false",
nimage:null, tiaotinghold:"false",
tiaotingimage:null,
dstate:"info", dstate:"info",
dimage:null, dimage:null,
m1state:null, m1state:null,
@ -125,13 +127,15 @@ export default {
m3state:"zhefan", m3state:"zhefan",
m3image:null, m3image:null,
m4state:"out", m4state:"out",
m4parking:false,
m4inTheStandArea:false,
m4image:null, m4image:null,
m5stateleft:false, m5stateleft:false,
m5stateright:false, m5stateright:false,
m5image:null, m5image:null,
m6state:"fache", m6state:"fache",
m6image:null, m6image:null,
m7state:"aoac", m7state:"aomc",
m7image:null, m7image:null,
m8state:"jinjizhidong", m8state:"jinjizhidong",
m8image:null, m8image:null,
@ -179,18 +183,18 @@ export default {
this.setimage(); this.setimage();
}, },
setimage(){ setimage(){
this.nimage = this.images.n['tiaoting']; this.tiaotingimage = this.images.n['none'];
this.dimage = this.images.d['info']; this.dimage = this.images.d['info'];
this.m1image = this.images.m1['rm']; this.m1image = this.images.m1['rm'];
this.m2image = this.images.m2['cbtc']; this.m2image = this.images.m2['cbtc'];
this.m3image = this.images.m3['zhefan']; this.m3image = this.images.m3['none'];
this.m4image = this.images.m4['out']; this.m4image = this.images.m4['none'];
this.m5image = this.images.m5['noalloffdoor']; this.m5image = this.images.m5['noalloffdoor'];
this.m6image = this.images.m6['fache']; this.m6image = this.images.m6['none'];
this.m7image = this.images.m7['aoac']; this.m7image = this.images.m7['aomc'];
this.m8image = this.images.m8['none']; this.m8image = this.images.m8['none'];
this.m9image = this.images.m9['ato']; this.m9image = this.images.m9['none'];
this.m10image = this.images.m10['jinduan']; this.m10image = this.images.m10['none'];
this.c1image = this.images.c1['none']; this.c1image = this.images.c1['none'];
this.c2image = this.images.c2['none']; this.c2image = this.images.c2['none'];
this.c3image = this.images.c3['normal']; this.c3image = this.images.c3['normal'];
@ -211,7 +215,7 @@ export default {
}, },
updatetrainstatus(newdata){ updatetrainstatus(newdata){
console.log(newdata);
if(typeof(newdata.eb) != "undefined"){ if(typeof(newdata.eb) != "undefined"){
this.updateEbStatus(newdata.eb); this.updateEbStatus(newdata.eb);
@ -227,6 +231,7 @@ export default {
this.updatemmidrivemodelevel(newdata.runLevel,newdata.driveMode,newdata.atoOn,newdata.atpOn); this.updatemmidrivemodelevel(newdata.runLevel,newdata.driveMode,newdata.atoOn,newdata.atpOn);
// this.updatammirunlevel(newdata.runLevel); // this.updatammirunlevel(newdata.runLevel);
// //
@ -241,6 +246,32 @@ export default {
this.updateMmiEndStation(newdata.endStation); this.updateMmiEndStation(newdata.endStation);
} }
if(newdata.jump){
}
if(newdata.parking != undefined){
this.m4parking = newdata.parking;
this.updateM4(newdata);
}
if(newdata.inTheStandArea != undefined){
this.m4inTheStandArea = newdata.inTheStandArea;
this.updateM4(newdata);
}
if(newdata.jump != undefined){
this.tiaotingjump = newdata.jump;
this.updateTiaoting(newdata);
}
if(newdata.hold != undefined){
this.tiaotinghold = newdata.hold;
this.updateTiaoting(newdata);
}
if(newdata.tow != undefined){
updatemmic1(newdata.tow);
}
this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose); this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
}, },
updatemmistate(aaa){ updatemmistate(aaa){
@ -283,6 +314,7 @@ export default {
} }
}else{ }else{
this.nowspeed = parseInt(speed); this.nowspeed = parseInt(speed);
if(this.mmimodel.updatezz){ if(this.mmimodel.updatezz){
this.mmimodel.updatezz(speed); this.mmimodel.updatezz(speed);
} }
@ -303,14 +335,49 @@ export default {
} }
if(this.newa1state != this.a1state){ if(this.newa1state != this.a1state){
this.a1state = this.newa1state; this.a1state = this.newa1state;
} }
this.oldspeed=this.nowspeed;
} }
}, },
updateM4(newdata){
console.log(newdata );
if(newdata.parking != undefined){
if(newdata.parking == true){
this.m4image = this.images.m4['in'];
}
}
if(newdata.inTheStandArea != undefined){
if(newdata.inTheStandArea == true){
this.m4image = this.images.m4['out'];
}
}
if(this.m4parking == false && this.m4inTheStandArea == false){
this.m4image = this.images.m4['none'];
}
},
updateTiaoting(newdata){
console.log(newdata);
if(newdata.jump != undefined){
if(newdata.jump == true){
this.tiaotingimage = this.images.n['tiaoting'];
}
}
if(newdata.hold != undefined){
if(newdata.hold == true){
this.tiaotingimage = this.images.n['kouche'];
}
}
if(this.tiaotingjump == false&& this.tiaotinghold == false){
this.tiaotingimage = this.images.n['none'];
}
},
updatedrivedata(drivedata){ updatedrivedata(drivedata){
// if(drivedata == "breaker"){ // if(drivedata == "breaker"){
// //
@ -409,24 +476,24 @@ export default {
} }
} }
// //
if(this.m9state1){ // if(this.m9state1){
this.m9state1 = atoon; // this.m9state1 = atoon;
if(atoon){ // if(atoon){
//
}else{ // }else{
this.m9image = this.images.m9["ato"]; // this.m9image = this.images.m9["ato"];
// this.c2image = this.images.c2['none']; // // this.c2image = this.images.c2['none'];
} // }
} // }
//
if(this.m9state2 != atpon){ // if(this.m9state2 != atpon){
this.m9state2 = atpon; // this.m9state2 = atpon;
if(atpon){ // if(atpon){
//
}else{ // }else{
this.m9image = this.images.m9["atp"]; // this.m9image = this.images.m9["atp"];
} // }
} // }
}, },
updatemmidoormode(leftDoorCanClose,rightDoorCanClose){ updatemmidoormode(leftDoorCanClose,rightDoorCanClose){
@ -482,25 +549,28 @@ export default {
this.malen = +parseInt(len)/2*10+"px"; this.malen = +parseInt(len)/2*10+"px";
} }
}, },
updatemmic1(qspeed){ updatemmic1(tow){
if(this.nowspeed != 0 ){ console.log("tow:"+tow);
this.newc1state = 'duoxing'; if(tow == "1"){
}else{ this.c1image = this.images.c1["qianyin"];
this.newc1state = 'none';
} }
if(qspeed>0){ if(tow == "2"){
this.c1image = this.images.c1["zhidong"];
this.newc1state = 'qianyin';
}else if(qspeed<0){
this.newc1state = 'zhidong';
} }
if(tow == "3"){
this.c1image = this.images.c1["duoxing"];
if(this.c1state != this.newc1state){
this.c1state = this.newc1state;
this.c1image = this.images.c1[this.c1state];
} }
if(tow == "4"){
this.c1image = this.images.c1["none"];
}
// if(tow){
// this.newc1state = 'duoxing';
// }
//
// if(this.c1state != this.newc1state){
// this.c1state = this.newc1state;
// this.c1image = this.images.c1[this.c1state];
// }
}, },
updateMmiNextStation(next){ updateMmiNextStation(next){
if(next){ if(next){

View File

@ -5,7 +5,9 @@
<el-tabs v-model="activeName" class="activediv" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" class="activediv" type="card" @tab-click="handleClick">
<el-tab-pane label="课程场景" name="progresslist" > <el-tab-pane label="课程场景" name="progresslist" >
<draggable v-model="lessonData.lessonData.lessonProgress" group="people" @start="drag=true" @end="drag=false" > <draggable v-model="lessonData.lessonData.lessonProgress" group="people" @start="drag=true" @end="drag=false" >
<div class="progressdiv" v-for="(element,index) in lessonData.lessonData.lessonProgress"> <div class="progressdiv"
:style="{'background-image': 'url('+localstatic+'/lesson3d/sc.png)'}"
v-for="(element,index) in lessonData.lessonData.lessonProgress">
<div class="changeprogressdiv" @click="changeProgressView(index)">{{element.progressName}}</div> <div class="changeprogressdiv" @click="changeProgressView(index)">{{element.progressName}}</div>
<div class="delprogressdiv" @click="removeProgress(index)" >X</div> <div class="delprogressdiv" @click="removeProgress(index)" >X</div>
</div> </div>
@ -16,9 +18,14 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="场景三维资源" name="assetlist" > <el-tab-pane label="场景三维资源" name="assetlist" >
<div class="progressdiv" v-for="(elementtrigger,indextrigger) in triggerList" :key="elementtrigger.label"> <div class="progressdiv"
<div class="changeprogressdiv" @click="selectModel(elementtrigger)">{{elementtrigger.label}}</div> v-for="(elementtrigger,indextrigger) in triggerList" :key="elementtrigger.label">
<div class="delprogressdiv" v-if="(elementtrigger.showType == 'loadModel')" @click="deleteModel(elementtrigger)" >X</div>
<div class="progressdivimg"
:style="{'background-image': 'url('+localstatic+'/lesson3d/box.png)'}"/>
<div class="progressdivtext" @click="selectModel(elementtrigger)">{{elementtrigger.label}}</div>
<div class="delprogressdiv" v-if="(elementtrigger.showType == 'loadModel')" @click="deleteModel(elementtrigger)" >删除</div>
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -120,13 +127,32 @@
top:5px; top:5px;
} }
.progressdiv{ .progressdiv{
width:100px; width:80px;
height:100px; height:100px;
// display:inline; // display:inline;
margin: 20px; margin: 20px;
float:left; float:left;
border:solid 2px #000; border:solid 1px #409EFF;
}
.progressdivimg{
width:70px;
height:70px;
margin-left: 5px;
left:5px;
background-size: 100%; background-size: 100%;
// display:inline;
float:left;
}
.progressdivtext{
width:80px;
height:30px;
margin: 0;
// display:inline;
float:left;
bottom: 0;
border:solid 1px #409EFF;
font-size: 15px;
} }
.changeprogressdiv{ .changeprogressdiv{
@ -140,11 +166,13 @@
.delprogressdiv{ .delprogressdiv{
// position: relative; // position: relative;
width: 100%; width: 20px;
height: 20%; height: 20px;
right: 0; right: 0;
bottom: 0; top: 0;
border:solid 2px #000; float: right;
// position:absolute;
border:solid 2px #409EFF;
} }
</style> </style>

View File

@ -19,16 +19,23 @@
<el-tab-pane label="三维资源" name="modelTrigger"> <el-tab-pane label="三维资源" name="modelTrigger">
<!-- <Assets-Model></Assets-Model> --> <!-- <Assets-Model></Assets-Model> -->
<draggable v-model="lessonAssetList" group="lessonAssetList" @start="drag=true" @end="drag=false" > <draggable v-model="lessonAssetList" group="lessonAssetList" @start="drag=true" @end="drag=false" >
<div class="progressdiv" v-for="(item,index) in lessonAssetList" @dragend="createModel($event,item,index)"> <div class="progressdiv" v-for="(item,index) in lessonAssetList"@dragend="createModel($event,item,index)">
{{item.packageName}} <div class="progressdivimg"
:style="{'background-image': 'url('+localstatic+'/lesson3d/box.png)'}"/>
<div class="progressdivtext">{{item.packageName}}</div>
</div> </div>
</draggable> </draggable>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图片资源列表" name="picasset"> <el-tab-pane label="图片资源列表" name="picasset">
<draggable v-model="picAssetList" group="picasset" @start="drag=true" @end="drag=false"> <draggable v-model="picAssetList" group="picasset" @start="drag=true" @end="drag=false">
<div class="progressdiv" <div class="progressdiv"
:style="{'background-image': 'url('+localStatic+item.url+')'}"
v-for="item in picAssetList" @click="changePicUrl($event,item)"> v-for="item in picAssetList" @click="changePicUrl($event,item)">
<div class="progressdivimg"
:style="{'background-image': 'url('+netStatic+item.url+')'}"/>
<div class="progressdivtext">{{item.packageName}}</div>
</div> </div>
</draggable> </draggable>
<!-- <Assets-Model></Assets-Model> --> <!-- <Assets-Model></Assets-Model> -->
@ -50,6 +57,8 @@
import { BASE_ASSET_API,getMap3dModelData } from '@/api/jlmap3d/assets3d.js' import { BASE_ASSET_API,getMap3dModelData } from '@/api/jlmap3d/assets3d.js'
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
export default { export default {
name: 'LessonTools', name: 'LessonTools',
props:['lessonTools'], props:['lessonTools'],
@ -58,7 +67,8 @@
}, },
data() { data() {
return { return {
localStatic:BASE_ASSET_API, localStatic:JL3D_LOCAL_STATIC,
netStatic:BASE_ASSET_API,
activeName: 'lessoncomponent', activeName: 'lessoncomponent',
lessonAssetList:[], lessonAssetList:[],
picAssetList:[], picAssetList:[],
@ -73,9 +83,13 @@
}, },
watch: { watch: {
},
onReady(){
}, },
mounted() { mounted() {
console.log(this.localStatic); this.localstatic = JL3D_LOCAL_STATIC;
console.log(this.localstatic);
getMap3dModelData("三维课程").then(netdata => { getMap3dModelData("三维课程").then(netdata => {
this.lessonAssetList = netdata.data; this.lessonAssetList = netdata.data;
}).catch(error => { }).catch(error => {
@ -153,13 +167,32 @@
} }
.progressdiv{ .progressdiv{
width:100px; width:80px;
height:100px; height:100px;
// display:inline; // display:inline;
margin: 20px; margin: 20px;
float:left; float:left;
border:solid 1px #409EFF;
}
.progressdivimg{
width:70px;
height:70px;
margin-left: 5px;
left:5px;
background-size: 100%; background-size: 100%;
border:solid 2px #000; // display:inline;
float:left;
}
.progressdivtext{
width:80px;
height:30px;
margin: 0;
// display:inline;
float:left;
bottom: 0;
border:solid 1px #409EFF;
font-size: 15px;
} }

BIN
static/lesson3d/box.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
static/lesson3d/sc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB