修改代码
This commit is contained in:
parent
00f0fd84a3
commit
d083482b10
@ -3,8 +3,8 @@ 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.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.4:9000' // 琰培
|
// BASE_API = 'http://192.168.3.4:9000' // 琰培
|
||||||
} else {
|
} else {
|
||||||
|
@ -43,10 +43,8 @@
|
|||||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Jl3d-Simulation v-show="simulationShow" :panelShow="simulationShow" ref="Jl3dSimulation" @showpanel="showpanel">
|
<Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" />
|
||||||
</Jl3d-Simulation>
|
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||||
<Jl3d-Drive v-show="drivingShow" :panelShow="drivingShow" ref="Jl3dDrive" @showdriving="showdriving">
|
|
||||||
</Jl3d-Drive>
|
|
||||||
|
|
||||||
<fault-choose ref="faultChoose" :group="group" />
|
<fault-choose ref="faultChoose" :group="group" />
|
||||||
<run-plan-Load ref="runPlanLoad" :group="group" />
|
<run-plan-Load ref="runPlanLoad" :group="group" />
|
||||||
@ -195,13 +193,6 @@ export default {
|
|||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.group = this.$route.query.group || '';
|
this.group = this.$route.query.group || '';
|
||||||
this.loading = this.$loading({
|
|
||||||
lock: true,
|
|
||||||
text: 'Loading',
|
|
||||||
spinner: 'el-icon-loading',
|
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
|
||||||
});
|
|
||||||
this.loading.close();
|
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.mode = this.$route.params.mode;
|
this.mode = this.$route.params.mode;
|
||||||
|
@ -40,7 +40,7 @@ export default {
|
|||||||
name: 'MenuDemon',
|
name: 'MenuDemon',
|
||||||
components: {
|
components: {
|
||||||
// ChartView,
|
// ChartView,
|
||||||
SetTime,
|
SetTime
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
group: {
|
group: {
|
||||||
|
@ -2,33 +2,31 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="display-card" :style="{top: offset + 'px'}">
|
<div class="display-card" :style="{top: offset + 'px'}">
|
||||||
<el-row style="vertical-align:middle; ">
|
<el-row style="vertical-align:middle; ">
|
||||||
<span class="display-time">{{formatTrainingUsedTime}}</span>
|
<span class="display-time">{{ formatTrainingUsedTime }}</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="display-draft">
|
<div class="display-draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="success" @click="start" :disabled="isDisable" :loading="startLoading">开始</el-button>
|
<el-button type="success" :disabled="isDisable" :loading="startLoading" @click="start">开始</el-button>
|
||||||
<el-button type="danger" @click="end" :disabled="!isDisable">结束</el-button>
|
<el-button type="danger" :disabled="!isDisable" @click="end">结束</el-button>
|
||||||
<el-button type="primary" @click="back" class="back">返回</el-button>
|
<el-button type="primary" class="back" @click="back">返回</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<tip-exam-list @refresh="refresh"></tip-exam-list>
|
<tip-exam-list @refresh="refresh" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TipExamList from './tipExamList';
|
import TipExamList from './tipExamList';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { Notification } from 'element-ui';
|
import { Notification } from 'element-ui';
|
||||||
import { startTraining } from '@/api/jmap/training';
|
import { startTraining } from '@/api/jmap/training';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { exitFullscreen } from '@/utils/screen';
|
||||||
import { exitFullscreen } from '@/utils/screen';
|
import { timeFormat } from '@/utils/date';
|
||||||
import { timeFormat } from '@/utils/date';
|
import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam';
|
||||||
import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { getTrainingDetail } from '@/api/jmap/training';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuExam',
|
name: 'MenuExam',
|
||||||
components: {
|
components: {
|
||||||
TipExamList
|
TipExamList
|
||||||
@ -39,7 +37,8 @@
|
|||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
offset: {
|
offset: {
|
||||||
type: Number
|
type: Number,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -50,8 +49,8 @@
|
|||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -81,13 +80,13 @@
|
|||||||
this.$store.dispatch('map/clearJlmapTrainView').then(() => {
|
this.$store.dispatch('map/clearJlmapTrainView').then(() => {
|
||||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
this.startLoading = false;
|
this.startLoading = false;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
this.startLoading = false;
|
this.startLoading = false;
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.startLoading = true;
|
this.startLoading = true;
|
||||||
this.$messageBox(`请选择试题`);
|
this.$messageBox(`请选择试题`);
|
||||||
@ -97,17 +96,17 @@
|
|||||||
if (this.$route.query.trainingId) {
|
if (this.$route.query.trainingId) {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
if (this.$store.state.training.started) {
|
if (this.$store.state.training.started) {
|
||||||
let model = {
|
const model = {
|
||||||
id: this.$route.query.examQuestionId,
|
id: this.$route.query.examQuestionId,
|
||||||
usedTime: this.$store.state.training.usedTime,
|
usedTime: this.$store.state.training.usedTime,
|
||||||
group: this.group
|
group: this.group
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/end', null);
|
this.$store.dispatch('training/end', null);
|
||||||
finishOneExamQuestion(model).then(response => {
|
finishOneExamQuestion(model).then(response => {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.init();
|
this.init();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.$messageBox(`结束实训错误`);
|
this.$messageBox(`结束实训错误`);
|
||||||
});
|
});
|
||||||
@ -129,7 +128,7 @@
|
|||||||
exitFullscreen();
|
exitFullscreen();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
this.$store.dispatch('exam/countUsedTime');
|
this.$store.dispatch('exam/countUsedTime');
|
||||||
@ -140,7 +139,7 @@
|
|||||||
this.$store.dispatch('exam/setTotalTime', response.data.duration);
|
this.$store.dispatch('exam/setTotalTime', response.data.duration);
|
||||||
this.$store.dispatch('trainingList/setTrainingList', response.data.userExamQuestionsVOs).then(response => { });
|
this.$store.dispatch('trainingList/setTrainingList', response.data.userExamQuestionsVOs).then(response => { });
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
//如果时50009则表示考试已完成,不能再次进行y
|
// 如果时50009则表示考试已完成,不能再次进行y
|
||||||
if (error.code === 500009) {
|
if (error.code === 500009) {
|
||||||
this.$router.replace({ path: `/exam/result/${this.$route.params.userExamId}` });
|
this.$router.replace({ path: `/exam/result/${this.$route.params.userExamId}` });
|
||||||
} else {
|
} else {
|
||||||
@ -153,7 +152,7 @@
|
|||||||
this.$store.dispatch('training/end', null);
|
this.$store.dispatch('training/end', null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -2,53 +2,57 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="display-card" :style="{top: offset + 'px'}">
|
<div class="display-card" :style="{top: offset + 'px'}">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-radio-group class="mode" size="small" v-model="demoMode">
|
<el-radio-group v-model="demoMode" class="mode" size="small">
|
||||||
<el-radio-button :label="TrainingMode.TEACH">教学模式</el-radio-button>
|
<el-radio-button :label="TrainingMode.TEACH">教学模式</el-radio-button>
|
||||||
<el-radio-button :label="TrainingMode.PRACTICE">练习模式</el-radio-button>
|
<el-radio-button :label="TrainingMode.PRACTICE">练习模式</el-radio-button>
|
||||||
<el-radio-button :label="TrainingMode.TEST">测验模式</el-radio-button>
|
<el-radio-button :label="TrainingMode.TEST">测验模式</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<span class="display-time">{{formatUsedTime}}</span>
|
<span class="display-time">{{ formatUsedTime }}</span>
|
||||||
<span class="display-score" v-if="demoMode === TrainingMode.TEST">得分:{{formatScore}}</span>
|
<span v-if="demoMode === TrainingMode.TEST" class="display-score">得分:{{ formatScore }}</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="display-draft">
|
<div class="display-draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="success" @click="start" :disabled="isDisable" :loading="startLoading">开始</el-button>
|
<el-button type="success" :disabled="isDisable" :loading="startLoading" @click="start">开始</el-button>
|
||||||
<el-button type="danger" @click="end" class="end" :disabled="!isDisable">结束</el-button>
|
<el-button type="danger" class="end" :disabled="!isDisable" @click="end">结束</el-button>
|
||||||
<el-button type="primary" @click="back" :disabled="backDisable" class="back">返回</el-button>
|
<el-button type="primary" :disabled="backDisable" class="back" @click="back">返回</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<tip-training-detail :trainingObj="trainingObj"></tip-training-detail>
|
<tip-training-detail :training-obj="trainingObj" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TipTrainingDetail from './tipTrainingDetail';
|
import TipTrainingDetail from './tipTrainingDetail';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { Notification } from 'element-ui';
|
import { Notification } from 'element-ui';
|
||||||
import { startTraining, endTraining } from '@/api/jmap/training';
|
import { startTraining, endTraining } from '@/api/jmap/training';
|
||||||
import { trainingNotify } from '@/api/simulation';
|
import { trainingNotify } from '@/api/simulation';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { TrainingMode } from '@/scripts/ConstDic';
|
||||||
import { exitFullscreen } from '@/utils/screen';
|
import { exitFullscreen } from '@/utils/screen';
|
||||||
import { timeFormat } from '@/utils/date';
|
import { timeFormat } from '@/utils/date';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuLesson',
|
name: 'MenuLesson',
|
||||||
|
components: {
|
||||||
|
TipTrainingDetail
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
group: {
|
group: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
trainingObj: {
|
trainingObj: {
|
||||||
type: Object
|
type: Object,
|
||||||
},
|
default() {
|
||||||
offset: {
|
return null;
|
||||||
type: Number
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
offset: {
|
||||||
TipTrainingDetail
|
type: Number,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -58,7 +62,7 @@
|
|||||||
isDisable: false,
|
isDisable: false,
|
||||||
backDisable: false,
|
backDisable: false,
|
||||||
startLoading: false
|
startLoading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -101,12 +105,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
start() {
|
start() {
|
||||||
//清空按钮操作
|
// 清空按钮操作
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
this.startLoading = true;
|
this.startLoading = true;
|
||||||
if (this.trainingObj && this.trainingObj.id) {
|
if (this.trainingObj && this.trainingObj.id) {
|
||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
startTraining(this.trainingObj, this.group).then(response => {
|
startTraining(this.trainingObj, this.group).then(response => {
|
||||||
|
debugger;
|
||||||
this.$store.dispatch('map/clearJlmapTrainView').then(() => {
|
this.$store.dispatch('map/clearJlmapTrainView').then(() => {
|
||||||
this.$store.dispatch('training/teachModeStart', this.demoMode);
|
this.$store.dispatch('training/teachModeStart', this.demoMode);
|
||||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||||
@ -115,10 +120,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.startLoading = false;
|
this.startLoading = false;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
this.startLoading = false;
|
this.startLoading = false;
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.startLoading = false;
|
this.startLoading = false;
|
||||||
this.$messageBox(`请选择实训`);
|
this.$messageBox(`请选择实训`);
|
||||||
@ -126,24 +131,24 @@
|
|||||||
},
|
},
|
||||||
endCommit() {
|
endCommit() {
|
||||||
this.$store.dispatch('training/setStopCountTime');
|
this.$store.dispatch('training/setStopCountTime');
|
||||||
let mode = {
|
const mode = {
|
||||||
mode: this.demoMode,
|
mode: this.demoMode,
|
||||||
id: this.trainingObj.id,
|
id: this.trainingObj.id,
|
||||||
lessonId: this.$route.query.lessonId,
|
lessonId: this.$route.query.lessonId,
|
||||||
usedTime: this.usedTime
|
usedTime: this.usedTime
|
||||||
}
|
};
|
||||||
|
|
||||||
endTraining(mode, this.group).then(response => {
|
endTraining(mode, this.group).then(response => {
|
||||||
let data = response.data;
|
const data = response.data;
|
||||||
this.$store.dispatch('training/judgeFinish', data).then(rsp => {
|
this.$store.dispatch('training/judgeFinish', data).then(rsp => {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(`结束实训错误`);
|
this.$messageBox(`结束实训错误`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
end() {
|
end() {
|
||||||
//如果是测试模式需要获取最终的得分
|
// 如果是测试模式需要获取最终的得分
|
||||||
if (this.trainingObj && this.trainingObj.id) {
|
if (this.trainingObj && this.trainingObj.id) {
|
||||||
if (this.started) {
|
if (this.started) {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
@ -168,7 +173,7 @@
|
|||||||
this.backDisable = false;
|
this.backDisable = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(`请先开始实训`);
|
this.$messageBox(`请先开始实训`);
|
||||||
}
|
}
|
||||||
@ -185,13 +190,13 @@
|
|||||||
this.$router.push({ path: `${UrlConfig.lesson.record}/${this.$route.query.trainingId}/${this.$route.query.trainingName}`, query: { group: resp.data } });
|
this.$router.push({ path: `${UrlConfig.lesson.record}/${this.$route.query.trainingId}/${this.$route.query.trainingName}`, query: { group: resp.data } });
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
history.go(-1);
|
history.go(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -2,23 +2,21 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="display-card" :style="{top: offset+'px'}">
|
<div class="display-card" :style="{top: offset+'px'}">
|
||||||
<el-row>
|
<el-row>
|
||||||
<span class="display-score" v-if="countTime">试用时间:{{ countTime }}</span>
|
<span v-if="countTime" class="display-score">试用时间:{{ countTime }}</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { getGoodsTryUse } from '@/api/management/goods';
|
||||||
import { getGoodsTryUse } from '@/api/management/goods'
|
import { PermissionType } from '@/scripts/ConstDic';
|
||||||
import { PermissionType } from '@/scripts/ConstDic';
|
import { exitFullscreen } from '@/utils/screen';
|
||||||
import { exitFullscreen } from '@/utils/screen';
|
import { getCountTime } from '@/utils/index';
|
||||||
import { getCountTime } from '@/utils/index';
|
import { runDiagramIsStart, runDiagramGetTime, runDiagramStart } from '@/api/simulation';
|
||||||
import { runDiagramIsStart, runDiagramGetTime, runDiagramStart } from '@/api/simulation';
|
import { timeFormat } from '@/utils/date';
|
||||||
import { timeFormat } from '@/utils/date';
|
|
||||||
|
|
||||||
|
export default {
|
||||||
export default {
|
|
||||||
name: 'MenuScreen',
|
name: 'MenuScreen',
|
||||||
props: {
|
props: {
|
||||||
group: {
|
group: {
|
||||||
@ -26,7 +24,8 @@
|
|||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
offset: {
|
offset: {
|
||||||
type: Number
|
type: Number,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -43,11 +42,11 @@
|
|||||||
name: '',
|
name: '',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.training.subscribeCount': function () {
|
'$store.state.training.subscribeCount': function () {
|
||||||
this.group && this.initLoadPage()
|
this.group && this.initLoadPage();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -60,11 +59,11 @@
|
|||||||
async initLoadPage() {
|
async initLoadPage() {
|
||||||
try {
|
try {
|
||||||
if (this.try != '0') {
|
if (this.try != '0') {
|
||||||
let data = {
|
const data = {
|
||||||
productType: PermissionType.SCREEN
|
productType: PermissionType.SCREEN
|
||||||
};
|
};
|
||||||
|
|
||||||
let resr = await getGoodsTryUse(data);
|
const resr = await getGoodsTryUse(data);
|
||||||
if (resr && resr.code == 200) {
|
if (resr && resr.code == 200) {
|
||||||
this.remainingTime = resr.data.tryTime;
|
this.remainingTime = resr.data.tryTime;
|
||||||
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
||||||
@ -82,8 +81,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let initTime = this.$route.query.initTime;
|
const initTime = this.$route.query.initTime;
|
||||||
let retp = await runDiagramIsStart(this.group);
|
const retp = await runDiagramIsStart(this.group);
|
||||||
if (retp && !retp.data) {
|
if (retp && !retp.data) {
|
||||||
await runDiagramStart({ initTime: initTime }, this.group);
|
await runDiagramStart({ initTime: initTime }, this.group);
|
||||||
}
|
}
|
||||||
@ -95,7 +94,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async loadSystemTime() {
|
async loadSystemTime() {
|
||||||
let rest = await runDiagramGetTime(this.group);
|
const rest = await runDiagramGetTime(this.group);
|
||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
||||||
}
|
}
|
||||||
@ -113,7 +112,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
@ -123,9 +122,7 @@
|
|||||||
display: inline;
|
display: inline;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 17px;
|
top: 17px;
|
||||||
float: left;
|
|
||||||
left: 30px;
|
left: 30px;
|
||||||
height: 32px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.display-card .el-row {
|
.display-card .el-row {
|
||||||
|
@ -1,42 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="display-card" :style="{top: offset+'px'}" v-if="isShowSystemTime">
|
<div v-if="isShowSystemTime" class="display-card" :style="{top: offset+'px'}">
|
||||||
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="1.3" :width="110" :height="32" :fine="2"
|
<system-time
|
||||||
:top="2"></system-time>
|
v-if="isShowSystemTime"
|
||||||
|
class="time"
|
||||||
|
:time="time"
|
||||||
|
:zoom="1.3"
|
||||||
|
:width="110"
|
||||||
|
:height="32"
|
||||||
|
:fine="2"
|
||||||
|
:top="2"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { prefixIntrger } from '@/utils/date';
|
||||||
import { prefixIntrger } from '@/utils/date';
|
import SystemTime from '@/views/components/systemTime/index';
|
||||||
import SystemTime from '@/views/components/systemTime/index';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuSystemTime',
|
name: 'MenuSystemTime',
|
||||||
props: {
|
|
||||||
offset: {
|
|
||||||
type: Number
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
SystemTime
|
SystemTime
|
||||||
},
|
},
|
||||||
data() {
|
props: {
|
||||||
return {
|
offset: {
|
||||||
time: '00:0000',
|
type: Number,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
data() {
|
||||||
'$store.state.training.initTime': function (initTime) {
|
return {
|
||||||
let date = new Date(initTime);
|
time: '00:0000'
|
||||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
|
};
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isShowSystemTime() {
|
isShowSystemTime() {
|
||||||
return this.$route.params.mode == 'demon' || this.$route.params.mode == 'dp' || this.$route.params.mode == 'plan' || !this.$route.params.mode;
|
return this.$route.params.mode == 'demon' || this.$route.params.mode == 'dp' || this.$route.params.mode == 'plan' || !this.$route.params.mode;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.training.initTime': function (initTime) {
|
||||||
|
const date = new Date(initTime);
|
||||||
|
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,32 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="reminder-drag" v-drag>
|
<div v-drag class="reminder-drag">
|
||||||
<div class="reminder-box" ref="drapBox">
|
<div ref="drapBox" class="reminder-box">
|
||||||
<div class="tip-title">
|
<div class="tip-title">
|
||||||
<i class="icon el-icon-minus" @click="shrink" v-show="isShrink"></i>
|
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||||
<i class="icon el-icon-plus" @click="shrink" v-show="!isShrink"></i>
|
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||||
<p style="color: #fff;" v-if="!isShrink">
|
<p v-if="!isShrink" style="color: #fff;">
|
||||||
<span class="time-label">考试计时:</span>
|
<span class="time-label">考试计时:</span>
|
||||||
<span class="time-elem">{{formatExamUsedTime}}</span>
|
<span class="time-elem">{{ formatExamUsedTime }}</span>
|
||||||
</p>
|
</p>
|
||||||
<p style="color: #fff;" v-if="isShrink">
|
<p v-if="isShrink" style="color: #fff;">
|
||||||
<span>{{examName}}</span>
|
<span>{{ examName }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tip-body-box" ref="dragBody">
|
<div ref="dragBody" class="tip-body-box">
|
||||||
<div class="tip-body" v-show="detailShow">
|
<div v-show="detailShow" class="tip-body">
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
<el-tree ref="treeQuestion" :data="trainingList" node-key="id" highlight-current
|
<el-tree
|
||||||
@node-click="getTrainDetail">
|
ref="treeQuestion"
|
||||||
|
:data="trainingList"
|
||||||
|
node-key="id"
|
||||||
|
highlight-current
|
||||||
|
@node-click="getTrainDetail"
|
||||||
|
>
|
||||||
<span slot-scope="{ node, data }">
|
<span slot-scope="{ node, data }">
|
||||||
<span :style="{color: data.usedTime !== undefined ? 'green':''}"> {{trainingList.indexOf(data)+1}}.{{
|
<span :style="{color: data.usedTime !== undefined ? 'green':''}"> {{ trainingList.indexOf(data)+1 }}.{{
|
||||||
data.trainingName}}
|
data.trainingName }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<div class="tip-body" v-show="!detailShow">
|
<div v-show="!detailShow" class="tip-body">
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
<p class="list-item">
|
<p class="list-item">
|
||||||
<span class="list-label">本题名称:</span>
|
<span class="list-label">本题名称:</span>
|
||||||
<span class="list-elem">{{ courseModel.name }}</span>
|
<span class="list-elem">{{ courseModel.name }}</span>
|
||||||
@ -46,37 +51,37 @@
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<div class="tip-foot">
|
<div class="tip-foot">
|
||||||
<div class="foot-detail" v-show="!detailShow">
|
<div v-show="!detailShow" class="foot-detail">
|
||||||
<el-button class="btn" @click="backList">查看试题</el-button>
|
<el-button class="btn" @click="backList">查看试题</el-button>
|
||||||
<el-button class="btn" type="primary" @click="lastExam" v-if="!isFirst">上一题</el-button>
|
<el-button v-if="!isFirst" class="btn" type="primary" @click="lastExam">上一题</el-button>
|
||||||
<el-button class="btn" type="primary" @click="nextExam" v-if="!isLast">下一题</el-button>
|
<el-button v-if="!isLast" class="btn" type="primary" @click="nextExam">下一题</el-button>
|
||||||
<el-button class="btn" type="primary" @click="overExam" v-if="isLast">提交试卷</el-button>
|
<el-button v-if="isLast" class="btn" type="primary" @click="overExam">提交试卷</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="foot-submit" v-show="detailShow">
|
<div v-show="detailShow" class="foot-submit">
|
||||||
<el-button class="btn" type="primary" @click="overExam">提交试卷</el-button>
|
<el-button class="btn" type="primary" @click="overExam">提交试卷</el-button>
|
||||||
</div>
|
</div>
|
||||||
<p style="color: #000; float: left;">
|
<p style="color: #000; float: left;">
|
||||||
<span class="time-label">考试计时:</span>
|
<span class="time-label">考试计时:</span>
|
||||||
<span class="time-elem">{{formatExamUsedTime}}</span>
|
<span class="time-elem">{{ formatExamUsedTime }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="drag-right"></div>
|
<div class="drag-right" />
|
||||||
<div class="drag-left"></div>
|
<div class="drag-left" />
|
||||||
<div class="drag-bottom"></div>
|
<div class="drag-bottom" />
|
||||||
<div class="drag-top"></div>
|
<div class="drag-top" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { timeFormat } from '@/utils/date';
|
import { timeFormat } from '@/utils/date';
|
||||||
import { refreshExamList } from '@/api/management/userexam';
|
import { refreshExamList } from '@/api/management/userexam';
|
||||||
import { getTrainingDetail } from '@/api/jmap/training';
|
import { getTrainingDetail } from '@/api/jmap/training';
|
||||||
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
|
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TipExamList',
|
name: 'TipExamList',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -98,12 +103,12 @@
|
|||||||
updateTime: ''
|
updateTime: ''
|
||||||
},
|
},
|
||||||
detailShow: false,
|
detailShow: false,
|
||||||
examIndex: 0,
|
examIndex: 0
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('trainingList', [
|
...mapGetters('trainingList', [
|
||||||
'trainingList',
|
'trainingList'
|
||||||
]),
|
]),
|
||||||
formatExamUsedTime() {
|
formatExamUsedTime() {
|
||||||
return timeFormat(this.$store.state.exam.usedTime);
|
return timeFormat(this.$store.state.exam.usedTime);
|
||||||
@ -113,7 +118,7 @@
|
|||||||
},
|
},
|
||||||
isLast() {
|
isLast() {
|
||||||
return this.examIndex == this.trainingList.length - 1;
|
return this.examIndex == this.trainingList.length - 1;
|
||||||
},
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -133,10 +138,10 @@
|
|||||||
this.examIndex = index;
|
this.examIndex = index;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
if (obj) {
|
if (obj) {
|
||||||
let that = this;
|
const that = this;
|
||||||
let data = { id: obj.trainingId };
|
const data = { id: obj.trainingId };
|
||||||
getTrainingDetail(data).then(res => {
|
getTrainingDetail(data).then(res => {
|
||||||
that.courseModel = {
|
that.courseModel = {
|
||||||
id: res.data.id,
|
id: res.data.id,
|
||||||
@ -144,10 +149,10 @@
|
|||||||
maxDuration: res.data.maxDuration,
|
maxDuration: res.data.maxDuration,
|
||||||
remarks: res.data.remarks,
|
remarks: res.data.remarks,
|
||||||
minDuration: res.data.minDuration,
|
minDuration: res.data.minDuration,
|
||||||
updateTime: res.data.updateTime,
|
updateTime: res.data.updateTime
|
||||||
};
|
};
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
that.$message.error('获取试题息失败:' + error.message)
|
that.$message.error('获取试题息失败:' + error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,10 +171,10 @@
|
|||||||
this.$store.dispatch('exam/setUsedTime', response.data.usedTime);
|
this.$store.dispatch('exam/setUsedTime', response.data.usedTime);
|
||||||
this.$store.dispatch('exam/setTotalTime', response.data.duration);
|
this.$store.dispatch('exam/setTotalTime', response.data.duration);
|
||||||
this.$store.dispatch('trainingList/setTrainingList', response.data.userExamQuestionsVOs).then(response => { });
|
this.$store.dispatch('trainingList/setTrainingList', response.data.userExamQuestionsVOs).then(response => { });
|
||||||
let obj = {
|
const obj = {
|
||||||
trainingId: '',
|
trainingId: '',
|
||||||
id: '',
|
id: ''
|
||||||
}
|
};
|
||||||
if (this.$route.query.examQuestionId && this.$route.query.trainingId) {
|
if (this.$route.query.examQuestionId && this.$route.query.trainingId) {
|
||||||
obj.trainingId = this.$route.query.trainingId;
|
obj.trainingId = this.$route.query.trainingId;
|
||||||
obj.id = this.$route.query.examQuestionId;
|
obj.id = this.$route.query.examQuestionId;
|
||||||
@ -179,7 +184,7 @@
|
|||||||
}
|
}
|
||||||
this.selectedTraining(obj);
|
this.selectedTraining(obj);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
//如果时50009则表示考试已完成,不能再次进行y
|
// 如果时50009则表示考试已完成,不能再次进行y
|
||||||
if (error.code === 500009) {
|
if (error.code === 500009) {
|
||||||
this.$router.replace({ path: `/exam/result/${this.$route.params.userExamId}` });
|
this.$router.replace({ path: `/exam/result/${this.$route.params.userExamId}` });
|
||||||
} else {
|
} else {
|
||||||
@ -190,10 +195,10 @@
|
|||||||
this.shrink();
|
this.shrink();
|
||||||
},
|
},
|
||||||
nextExam() {
|
nextExam() {
|
||||||
let obj = {
|
const obj = {
|
||||||
trainingId: '',
|
trainingId: '',
|
||||||
id: '',
|
id: ''
|
||||||
}
|
};
|
||||||
if (this.trainingList[this.examIndex + 1] && this.trainingList[this.examIndex + 1].trainingId) {
|
if (this.trainingList[this.examIndex + 1] && this.trainingList[this.examIndex + 1].trainingId) {
|
||||||
obj.trainingId = this.trainingList[this.examIndex + 1].trainingId;
|
obj.trainingId = this.trainingList[this.examIndex + 1].trainingId;
|
||||||
obj.id = this.trainingList[this.examIndex + 1].id;
|
obj.id = this.trainingList[this.examIndex + 1].id;
|
||||||
@ -204,10 +209,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
lastExam() {
|
lastExam() {
|
||||||
let obj = {
|
const obj = {
|
||||||
trainingId: '',
|
trainingId: '',
|
||||||
id: '',
|
id: ''
|
||||||
}
|
};
|
||||||
if (this.trainingList[this.examIndex - 1] && this.trainingList[this.examIndex - 1].trainingId) {
|
if (this.trainingList[this.examIndex - 1] && this.trainingList[this.examIndex - 1].trainingId) {
|
||||||
obj.trainingId = this.trainingList[this.examIndex - 1].trainingId;
|
obj.trainingId = this.trainingList[this.examIndex - 1].trainingId;
|
||||||
obj.id = this.trainingList[this.examIndex - 1].id;
|
obj.id = this.trainingList[this.examIndex - 1].id;
|
||||||
@ -218,12 +223,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
jump(obj) {
|
jump(obj) {
|
||||||
let query = {
|
const query = {
|
||||||
group: this.$route.query.group,
|
group: this.$route.query.group,
|
||||||
userExamId: this.$route.query.userExamId,
|
userExamId: this.$route.query.userExamId,
|
||||||
trainingId: obj.trainingId,
|
trainingId: obj.trainingId,
|
||||||
examQuestionId: obj.id
|
examQuestionId: obj.id
|
||||||
}
|
};
|
||||||
this.$router.push({ path: '/display/exam', query: query });
|
this.$router.push({ path: '/display/exam', query: query });
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
@ -253,8 +258,8 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
shrink() {
|
shrink() {
|
||||||
let height = this.$refs.dragBody.offsetHeight + 40;
|
const height = this.$refs.dragBody.offsetHeight + 40;
|
||||||
let top = this.$refs.drapBox.style.top;
|
const top = this.$refs.drapBox.style.top;
|
||||||
if (this.isShrink) {
|
if (this.isShrink) {
|
||||||
this.$refs.drapBox.style.height = '40px';
|
this.$refs.drapBox.style.height = '40px';
|
||||||
this.$refs.drapBox.style.top = '';
|
this.$refs.drapBox.style.top = '';
|
||||||
@ -266,7 +271,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="reminder-drag">
|
<div class="reminder-drag">
|
||||||
<div class="reminder-box" ref="drapBox">
|
<div ref="drapBox" class="reminder-box">
|
||||||
<div class="tip-title">
|
<div class="tip-title">
|
||||||
<i class="icon el-icon-minus" @click="shrink" v-show="isShrink"></i>
|
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||||
<i class="icon el-icon-plus" @click="shrink" v-show="!isShrink"></i>
|
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||||
<p style="color: #fff;" v-if="isShrink">
|
<p v-if="isShrink" style="color: #fff;">
|
||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tip-body-box" ref="dragBody">
|
<div ref="dragBody" class="tip-body-box">
|
||||||
<div class="tip-body">
|
<div class="tip-body">
|
||||||
<div>
|
<div>
|
||||||
<get-action ref="getAction" :group="group"></get-action>
|
<get-action ref="getAction" :group="group" />
|
||||||
</div>
|
</div>
|
||||||
<el-button-group class="button-group">
|
<el-button-group class="button-group">
|
||||||
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
|
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
|
||||||
<el-button type="primary" @click="saveMaplocation">{{$t('scriptRecord.saveMaplocation')}}</el-button>
|
<el-button type="primary" @click="saveMaplocation">{{ $t('scriptRecord.saveMaplocation') }}</el-button>
|
||||||
<el-button type="primary" @click="saveScenesStage">{{$t('scriptRecord.saveBackground')}}</el-button>
|
<el-button type="primary" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</el-button>
|
||||||
<el-button type="success" @click="saveScenesData">{{$t('scriptRecord.saveData')}}</el-button>
|
<el-button type="success" @click="saveScenesData">{{ $t('scriptRecord.saveData') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -25,30 +25,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import GetAction from './scriptRecord/getAction';
|
import GetAction from './scriptRecord/getAction';
|
||||||
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
|
import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation} from '@/api/simulation';
|
||||||
import {saveScriptScenes, saveScriptData, dumpScriptData,updateMapLocation} from '@/api/simulation';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TipScriptRecord',
|
name: 'TipScriptRecord',
|
||||||
|
components: {
|
||||||
|
GetAction
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
group: {
|
group: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
}
|
||||||
},
|
|
||||||
components: {
|
|
||||||
GetAction,
|
|
||||||
},
|
},
|
||||||
// this.$t('scriptRecord.scriptTitle')
|
// this.$t('scriptRecord.scriptTitle')
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title:"剧本编制",
|
title: '剧本编制',
|
||||||
isShrink: false,
|
isShrink: false,
|
||||||
mapLocation:{},
|
mapLocation: {}
|
||||||
// isSaveStage: true,
|
// isSaveStage: true,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||||
@ -57,15 +56,15 @@
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted() {
|
||||||
this.shrink();
|
this.shrink();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
jump(obj) {
|
jump(obj) {
|
||||||
},
|
},
|
||||||
shrink() {
|
shrink() {
|
||||||
let height = this.$refs.dragBody.offsetHeight + 40;
|
const height = this.$refs.dragBody.offsetHeight + 40;
|
||||||
let top = this.$refs.drapBox.style.top;
|
const top = this.$refs.drapBox.style.top;
|
||||||
if (this.isShrink) {
|
if (this.isShrink) {
|
||||||
this.$refs.drapBox.style.height = '40px';
|
this.$refs.drapBox.style.height = '40px';
|
||||||
this.$refs.drapBox.style.top = '';
|
this.$refs.drapBox.style.top = '';
|
||||||
@ -85,19 +84,19 @@
|
|||||||
saveScriptScenes(this.group).then(resp => {
|
saveScriptScenes(this.group).then(resp => {
|
||||||
// this.isSaveStage = false;
|
// this.isSaveStage = false;
|
||||||
this.$message.success('保存背景成功');
|
this.$message.success('保存背景成功');
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox('保存背景失败!');
|
this.$messageBox('保存背景失败!');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
saveScenesData() {
|
saveScenesData() {
|
||||||
saveScriptData(this.group).then(resp => {
|
saveScriptData(this.group).then(resp => {
|
||||||
this.$message.success('保存数据成功');
|
this.$message.success('保存数据成功');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`保存数据失败!: ${error.message}`);
|
this.$messageBox(`保存数据失败!: ${error.message}`);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
dumpScenesData() {
|
dumpScenesData() {
|
||||||
let group=this.group;
|
const group=this.group;
|
||||||
this.$confirm('此操作将会清除已保存的编制数据, 是否继续?', '提示', {
|
this.$confirm('此操作将会清除已保存的编制数据, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
@ -106,24 +105,23 @@
|
|||||||
dumpScriptData(group).then(resp => {
|
dumpScriptData(group).then(resp => {
|
||||||
// this.isSaveStage = true;
|
// this.isSaveStage = true;
|
||||||
this.$message.success('清除数据成功');
|
this.$message.success('清除数据成功');
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox('清除数据失败!');
|
this.$messageBox('清除数据失败!');
|
||||||
})
|
});
|
||||||
}).catch(error => { })
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
saveMaplocation()
|
saveMaplocation() {
|
||||||
{
|
const data=Vue.prototype.$jlmap.$options;
|
||||||
let data=Vue.prototype.$jlmap.$options;
|
const group=this.$route.query.group;
|
||||||
let group=this.$route.query.group;
|
const dataZoom={scale: data.scaleRate, x: data.offsetX, y: data.offsetY};
|
||||||
let dataZoom={scale:data.scaleRate,x:data.offsetX,y:data.offsetY};
|
updateMapLocation(group, dataZoom).then(response=>{
|
||||||
updateMapLocation(group,dataZoom).then(response=>{
|
|
||||||
this.$message.success('更新定位成功');
|
this.$message.success('更新定位成功');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`更新定位失败: ${error.message}`);
|
this.$messageBox(`更新定位失败: ${error.message}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="reminder-drag" v-drag>
|
<div v-drag class="reminder-drag">
|
||||||
<div class="reminder-box" ref="drapBox">
|
<div ref="drapBox" class="reminder-box">
|
||||||
<div class="tip-title">
|
<div class="tip-title">
|
||||||
<i class="icon el-icon-minus" @click="shrink" v-show="isShrink"></i>
|
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||||
<i class="icon el-icon-plus" @click="shrink" v-show="!isShrink"></i>
|
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||||
<p style="color: #fff;" v-if="isShrink">
|
<p v-if="isShrink" style="color: #fff;">
|
||||||
<span>{{lessonName}}</span>
|
<span>{{ lessonName }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tip-body-box" ref="dragBody">
|
<div ref="dragBody" class="tip-body-box">
|
||||||
<div class="tip-body">
|
<div class="tip-body">
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
<p class="list-item">
|
<p class="list-item">
|
||||||
<span class="list-label">实训名称:</span>
|
<span class="list-label">实训名称:</span>
|
||||||
<span class="list-elem">{{ courseModel.name }}</span>
|
<span class="list-elem">{{ courseModel.name }}</span>
|
||||||
@ -29,27 +29,28 @@
|
|||||||
</p>
|
</p>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<div class="drag-right"></div>
|
<div class="drag-right" />
|
||||||
<div class="drag-left"></div>
|
<div class="drag-left" />
|
||||||
<div class="drag-bottom"></div>
|
<div class="drag-bottom" />
|
||||||
<div class="drag-top"></div>
|
<div class="drag-top" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { timeFormat } from '@/utils/date';
|
import { getPublishLessonDetail } from '@/api/jmap/lesson';
|
||||||
import { getTrainingDetail, trainingNotify } from '@/api/jmap/training';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { getPublishLessonDetail } from '@/api/jmap/lesson';
|
|
||||||
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TipTrainingDetail',
|
name: 'TipTrainingDetail',
|
||||||
props: {
|
props: {
|
||||||
trainingObj: {
|
trainingObj: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -71,12 +72,12 @@
|
|||||||
updateTime: ''
|
updateTime: ''
|
||||||
},
|
},
|
||||||
showSumbit: false,
|
showSumbit: false,
|
||||||
lessonIndex: 0,
|
lessonIndex: 0
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('trainingList', [
|
...mapGetters('trainingList', [
|
||||||
'trainingList',
|
'trainingList'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -114,24 +115,24 @@
|
|||||||
getPublishLessonDetail({ id: obj.lessonId }).then(response => {
|
getPublishLessonDetail({ id: obj.lessonId }).then(response => {
|
||||||
this.lessonName = response.data.name;
|
this.lessonName = response.data.name;
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
that.$message.error("获取课程信息失败:" + error.message);
|
this.$message.error('获取课程信息失败:' + error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.shrink();
|
this.shrink();
|
||||||
},
|
},
|
||||||
jump(obj) {
|
jump(obj) {
|
||||||
let query = {
|
const query = {
|
||||||
group: this.$route.query.group,
|
group: this.$route.query.group,
|
||||||
trainingId: this.$route.query.trainingId,
|
trainingId: this.$route.query.trainingId,
|
||||||
lessonId: this.$route.query.lessonId
|
lessonId: this.$route.query.lessonId
|
||||||
}
|
};
|
||||||
this.$router.push({ path: `/display/${this.$route.params.mode}`, query: query })
|
this.$router.push({ path: `/display/${this.$route.params.mode}`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
},
|
},
|
||||||
shrink() {
|
shrink() {
|
||||||
let height = this.$refs.dragBody.offsetHeight + 40;
|
const height = this.$refs.dragBody.offsetHeight + 40;
|
||||||
let top = this.$refs.drapBox.style.top;
|
const top = this.$refs.drapBox.style.top;
|
||||||
if (this.isShrink) {
|
if (this.isShrink) {
|
||||||
this.$refs.drapBox.style.height = '40px';
|
this.$refs.drapBox.style.height = '40px';
|
||||||
this.$refs.drapBox.style.top = '';
|
this.$refs.drapBox.style.top = '';
|
||||||
@ -143,7 +144,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
Loading…
Reference in New Issue
Block a user