This commit is contained in:
joylink_cuiweidong 2022-09-02 10:22:46 +08:00
commit a99e6e44bd
11 changed files with 38 additions and 30 deletions

View File

@ -440,4 +440,7 @@ export default class SignalButton extends Group {
} }
} }
getAnchorPoint() {} getAnchorPoint() {}
getShapeTipPoint() {
return this.computedPosition;
}
} }

View File

@ -9,6 +9,7 @@
:z-index="3000" :z-index="3000"
:append-to-body="true" :append-to-body="true"
:modal="true" :modal="true"
:close-on-click-modal="false"
> >
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
@ -93,28 +94,20 @@ export default {
}, },
created() { created() {
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map)) this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map))
// console.log(this.mapData.pictureList)
}, },
methods: { methods: {
doShow(stationCode) { doShow(stationCode) {
this.show = true this.show = true
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('map/setPictureDeviceMap', {})
const picData = this.mapData.pictureList.find(pic => pic.stationCode === stationCode && pic.type === 'regionBatchOperation') const picData = this.mapData.pictureList.find(pic => pic.stationCode === stationCode && pic.type === 'regionBatchOperation')
this.$store.dispatch('map/setPictureDeviceMap', picData.deviceMap) this.$store.dispatch('map/setPictureDeviceMap', picData.deviceMap)
const mapDevice = this.$store.state.map.mapDevice
const list = [] const list = []
for (const deviceCode in mapDevice) { for (const deviceCode in picData.deviceMap) {
list.push(deviceCode) list.push(deviceCode)
} }
// debugger
this.$refs.mapVisual.loadData() this.$refs.mapVisual.loadData()
this.$refs.mapVisual.map.updatePicture(list) this.$refs.mapVisual.map.updatePicture(list)
this.$refs.mapVisual.map.updateTransform(picData.scaling, picData.origin) this.$refs.mapVisual.map.updateTransform(picData.scaling, picData.origin)
// console.log(this.mapData)
// console.log('picData mapDevice len', picData.deviceMap.length)
// console.log(this.$store.state.map.mapDevice)
// this.$refs.mapVisual.setMap(this.mapData, this.$store.state.map.mapDevice)
}) })
}, },
doClose() { doClose() {

View File

@ -131,7 +131,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { MouseEvent } from '@/scripts/ConstDic'; import { MouseEvent } from '@/scripts/ConstDic';
// import { OperateMode } from '@/scripts/ConstDic';
export default { export default {
name: 'MapButtonMenu', name: 'MapButtonMenu',

View File

@ -271,7 +271,7 @@ export default {
{ label: '代表值', value: 'V' } { label: '代表值', value: 'V' }
], ],
operationList: [ operationList: [
{ label: '', value: 'AND' }, { label: '', value: 'AND' },
{ label: '或', value: 'OR' }, { label: '或', value: 'OR' },
{ label: '非', value: 'NOT' }, { label: '非', value: 'NOT' },
{ label: '是', value: 'IS' }, { label: '是', value: 'IS' },

View File

@ -914,6 +914,12 @@ export const RegisterCodeList = ['cgy', 'designcgy'];
export const RichorContectUsList = ['richor', 'richorygy', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs']; export const RichorContectUsList = ['richor', 'richorygy', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 帮助中不展示版权(福州 佛山) */ /** 帮助中不展示版权(福州 佛山) */
export const NoCopyrightList = ['richor', 'richorygy', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs']; export const NoCopyrightList = ['richor', 'richorygy', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 真实cctv */
export const RealCctvList = ['richorjoint', 'richorhhcj'];
export const RealCctvMap = {
richorjoint: 'http://192.168.1.254',
richorhhcj: 'http://192.168.0.254'
};
/** 导航栏快速切换平台 */ /** 导航栏快速切换平台 */
export const goOtherPlatformMenu = { export const goOtherPlatformMenu = {
login: '/design/login', login: '/design/login',

View File

@ -6,7 +6,7 @@ const training = {
trainingSwitch: false, // 实训开始结束标志 trainingSwitch: false, // 实训开始结束标志
trainingOperate: null, trainingOperate: null,
simulationPause: false, // 实训 暂停判断 simulationPause: false, // 实训 暂停判断
stepOrder: 1, stepOrder: 0,
operateOrder: 0, operateOrder: 0,
stepOverCount: 0, stepOverCount: 0,
trainingScore: '' trainingScore: ''
@ -130,7 +130,7 @@ const training = {
flag = (trainingOperate.userOperationType === stepOperation.userOperationType) && flag; flag = (trainingOperate.userOperationType === stepOperation.userOperationType) && flag;
} }
for (const param in stepOperation.params) { for (const param in stepOperation.params) {
flag = (trainingOperate.params[param] === stepOperation.params[param]) && flag; flag = (trainingOperate.param[param] === stepOperation.params[param]) && flag;
} }
if (flag && step.operations.length === (operateIndex + 1 )) { if (flag && step.operations.length === (operateIndex + 1 )) {
commit('stepOverCountChange'); commit('stepOverCountChange');
@ -139,7 +139,11 @@ const training = {
commit('operateOrderIncrease'); commit('operateOrderIncrease');
resolve(); resolve();
} else { } else {
console.error('校验失败;'); const stepList = JSON.parse(state.trainingDetail.stepJson);
const step = stepList.find(item => item.id == state.stepOrder );
const operateIndex = step.operations.findIndex(item => item.id == state.operateOrder);
const stepOperation = step.operations[operateIndex];
console.error('校验失败;', trainingOperate, stepOperation);
reject('校验失败'); reject('校验失败');
} }
}); });

View File

@ -3,6 +3,7 @@
<menu-demon ref="menuDemon" /> <menu-demon ref="menuDemon" />
<training-jlmap refs="trainingJlmap" /> <training-jlmap refs="trainingJlmap" />
<training-tip ref="trainingTip" /> <training-tip ref="trainingTip" />
<training-position-tip ref="trainingPositionTip" />
<el-button size="small" class="fault-button" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button> <el-button size="small" class="fault-button" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
<div class="trainBack"> <div class="trainBack">
<el-button-group> <el-button-group>
@ -23,13 +24,15 @@ import TrainingJlmap from './trainingJlmap';
import MenuDemon from '@/views/trainingManage/demonMenu.vue'; import MenuDemon from '@/views/trainingManage/demonMenu.vue';
import TrainingTip from './trainingTip'; import TrainingTip from './trainingTip';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import TrainingPositionTip from './trainingPositionTip';
export default { export default {
name: 'TrainingDesign', name: 'TrainingDesign',
components: { components: {
MenuDemon, MenuDemon,
TrainingTip, TrainingTip,
TrainingJlmap TrainingJlmap,
TrainingPositionTip
}, },
data() { data() {
return { return {
@ -140,8 +143,6 @@ export default {
}, },
nextStep() { nextStep() {
endTrainingStep(this.group, this.$store.state.trainingNew.stepOrder).then(resp => { endTrainingStep(this.group, this.$store.state.trainingNew.stepOrder).then(resp => {
this.$store.dispatch('trainingNew/clearOperateOrder');
this.$store.dispatch('trainingNew/stepOrderIncrease');
}).catch(() => { }).catch(() => {
this.$message.error('进入下一步实训失败!'); this.$message.error('进入下一步实训失败!');
}); });

View File

@ -32,15 +32,11 @@ export default {
]) ])
}, },
watch: { watch: {
// '$store.state.training.tipEvent': function (val) {
// setTimeout(() => { this.tipInit(); }, 300);
// this.$nextTick(function() {
// this.tipInit();
// });
// }
'$store.state.socket.trainingStepTip': function(val) { '$store.state.socket.trainingStepTip': function(val) {
if (val) { if (val) {
this.$nextTick(function() { this.$nextTick(function() {
this.$store.dispatch('trainingNew/clearOperateOrder');
this.$store.dispatch('trainingNew/stepOrderIncrease');
this.tipInit(); this.tipInit();
}); });
} }
@ -66,6 +62,7 @@ export default {
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;
const stepOrder = this.$store.state.trainingNew.stepOrder; const stepOrder = this.$store.state.trainingNew.stepOrder;
const steps = JSON.parse(trainingDetail.stepJson); const steps = JSON.parse(trainingDetail.stepJson);
console.log(stepOrder, '-----------');
if (steps && steps.length) { if (steps && steps.length) {
const step = steps[stepOrder - 1]; const step = steps[stepOrder - 1];
const distance = 5; const distance = 5;
@ -95,7 +92,6 @@ export default {
} else { } else {
this.tipShow = false; this.tipShow = false;
} }
console.log(this.tipShow, this.popShow, this.position);
}, },
popTipShow() { popTipShow() {
this.popShow = true; this.popShow = true;

View File

@ -107,8 +107,6 @@ export default {
}, },
nextStep() { nextStep() {
endTrainingStep(this.group, this.$store.state.trainingNew.stepOrder).then(resp => { endTrainingStep(this.group, this.$store.state.trainingNew.stepOrder).then(resp => {
this.$store.dispatch('trainingNew/clearOperateOrder');
this.$store.dispatch('trainingNew/stepOrderIncrease');
}).catch(() => { }).catch(() => {
this.$message.error('进入下一步实训失败!'); this.$message.error('进入下一步实训失败!');
}); });

View File

@ -148,7 +148,7 @@ import bgPsdImg from '@/assets/bg_psd.png';
import HandRight from '@/assets/hand-o-right.png'; import HandRight from '@/assets/hand-o-right.png';
import wchat from '@/assets/wchat.png'; import wchat from '@/assets/wchat.png';
import { UrlConfig } from '@/scripts/ConstDic'; import { UrlConfig } from '@/scripts/ConstDic';
import { loginInfo, ProjectIcon, ProjectLoginStyleList, VersionBaseNoShow, MainBodyNoShow, NoQrcodeList, localPackageProject, RegisterCodeList} from '@/scripts/ProjectConfig'; import { loginInfo, ProjectIcon, ProjectLoginStyleList, VersionBaseNoShow, MainBodyNoShow, NoQrcodeList, localPackageProject, RegisterCodeList, RealCctvList} from '@/scripts/ProjectConfig';
import { removeToken, getToken } from '@/utils/auth'; import { removeToken, getToken } from '@/utils/auth';
import LangStorage from '@/utils/lang'; import LangStorage from '@/utils/lang';
import FloatPart from './floatPart'; import FloatPart from './floatPart';
@ -485,7 +485,7 @@ export default {
projectDevice: this.$route.query.projectDevice, projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type} }); type: this.$route.query.type} });
} else if (this.$route.query.type == 'CCTV') { } else if (this.$route.query.type == 'CCTV') {
if (this.project == 'richorjoint') { if (RealCctvList.includes(this.project)) {
this.$router.push({ this.$router.push({
path:'/jointTrainingNewCCTV', path:'/jointTrainingNewCCTV',
query:{ query:{

View File

@ -3,12 +3,12 @@
<div id="jlReal3d" class="jlReal3d"> <div id="jlReal3d" class="jlReal3d">
<div class="realCctv1"> <div class="realCctv1">
<video id="myvideo0" class="video-js"> <video id="myvideo0" class="video-js">
<source src="http://192.168.1.254/hls/cctv1.m3u8" type="application/x-mpegURL"> <source :src="`${host}/hls/cctv1.m3u8`" type="application/x-mpegURL">
</video> </video>
</div> </div>
<div class="realCctv2"> <div class="realCctv2">
<video id="myvideo1" class="video-js"> <video id="myvideo1" class="video-js">
<source src="http://192.168.1.254/hls/cctv2.m3u8" type="application/x-mpegURL"> <source :src="`${host}/hls/cctv2.m3u8`" type="application/x-mpegURL">
</video> </video>
</div> </div>
</div> </div>
@ -22,6 +22,8 @@
<script> <script>
import Video from 'video.js'; import Video from 'video.js';
import 'video.js/dist/video-js.css'; import 'video.js/dist/video-js.css';
import { RealCctvMap } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth';
export default { export default {
name:'RealCCTV', name:'RealCCTV',
data() { data() {
@ -29,6 +31,12 @@ export default {
videoList:[] videoList:[]
}; };
}, },
computed: {
host() {
const project = getSessionStorage('project');
return RealCctvMap[project];
}
},
mounted() { mounted() {
for (var i = 0; i < 2; i++) { for (var i = 0; i < 2; i++) {
const videoPlay = new Video('myvideo' + i, { const videoPlay = new Video('myvideo' + i, {