代码调整

This commit is contained in:
fan 2020-01-06 14:43:08 +08:00
parent 68a7171495
commit 2554ed1135
12 changed files with 215 additions and 804 deletions

View File

@ -12,7 +12,10 @@ export default {
endTrainingError: 'Ending training error',
endTrainingTip: 'The operation is not completed, confirm the end?',
startTrainingTip: 'Please start training',
createSimulationError: 'create simulation error'
createSimulationError: 'create simulation error',
coursePracticeList: 'Course practice list',
unfold: 'Unfold',
fold: 'fold'
},
exam: {
startTestOperateTip: 'Please click to start the exam',

View File

@ -12,7 +12,10 @@ export default {
endTrainingError: '结束实训错误',
endTrainingTip: '操作未完成,是否确认结束?',
startTrainingTip: '请先开始实训',
createSimulationError: '创建仿真失败'
createSimulationError: '创建仿真失败',
coursePracticeList: '课程实训列表',
unfold: '展开',
fold: '收回'
},
exam: {
startTestOperateTip: '请点击开始考试操作',

View File

@ -156,13 +156,15 @@ export default {
this.$messageBox(this.$t('global.buyingTips'));
},
checkCourse() {
this.disabled = true;
setTimeout(() => {
this.loading = true;
if (this.isAddRule) {
this.$router.push({
path: `${UrlConfig.trainingPlatform.examRuleManage}`,
query: { lessonId: this.courseModel.id }
});
}, 100);
} else {
this.$messageBox(this.$t('tip.notViewTheCoursePaper'));
}
},
distribute() { //
this.disabled = true;

View File

@ -192,7 +192,7 @@ export default {
roomId: this.$route.query.roomId
});
res.data.forEach(item => {
if (it.id == item.projectDeviceId) { // it.idint item.projectDeviceIdstring
if (it.id == item.projectDeviceId) { // it.idnumber item.projectDeviceIdstring
this.options[index].id = item.id;
this.options[index].deviceCode = item.deviceCode;
}
@ -250,10 +250,10 @@ export default {
// cancelButtonText: '',
// type: 'warning'
// }).then(()=> {
// this.undate();
// this.update();
// });
// } else {
// this.undate();
// this.update();
// }
// });
this.update();

View File

@ -2,12 +2,12 @@
<div id="leftSlider" class="left-slider">
<div class="tip-title">
<span>
课程实训列表
{{ $t('display.lesson.coursePracticeList') }}
</span>
</div>
<div class="handleShow">
<span v-if="show" class="el-icon-arrow-right" @click="handleSliderShow(true)">展开</span>
<span v-else class="el-icon-arrow-left" @click="handleSliderShow(false)">收回</span>
<span v-if="show" class="el-icon-arrow-right" @click="handleSliderShow(true)">{{ $t('display.lesson.unfold') }}</span>
<span v-else class="el-icon-arrow-left" @click="handleSliderShow(false)">{{ $t('display.lesson.fold') }}</span>
</div>
<div class="slider-tree">
<el-scrollbar wrap-class="scrollbar-wrapper">

View File

@ -19,14 +19,10 @@
@showScheduling="showScheduling"
/>
<menu-screen v-if="isScreen" ref="menuScreen" :offset="offset" :group="group" @tryTime="tryTime" />
<menu-plan v-if="isPlan" ref="menuPlan" :offset="offset" :group="group" />
<menu-script v-if="isScript" ref="menuScript" :offset="offset" :group="group" />
<menu-schema
v-if="isDemon || isPlan || isScript "
v-if="isDemon || isScript "
ref="menuSchema"
:offset="offset"
:group="group"
@ -55,10 +51,8 @@ import FaultChoose from './demon/faultChoose';
import MapSystemDraft from '@/views/mapsystem/index';
import MenuLesson from '@/views/display/menuLesson';
import MenuDemon from '@/views/display/menuDemon';
import MenuScreen from '@/views/display/menuScreen';
import MenuSchema from '@/views/display/menuSchema';
import MenuSystemTime from '@/views/display/menuSystemTime';
import MenuPlan from '@/views/display/menuPlan';
import MenuScript from '@/views/display/menuScript';
import AddQuest from './demon/addQuest';
import Scheduling from './demon/scheduling';
@ -85,9 +79,7 @@ export default {
AddQuest,
MenuLesson,
MapSystemDraft,
MenuPlan,
MenuDemon,
MenuScreen,
MenuScript,
MenuSchema,
MenuSystemTime,
@ -167,19 +159,13 @@ export default {
return this.$route.query.skinCode;
},
isLesson() {
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
return this.mode === 'teach' || this.mode === 'manage';
},
isDemon() {
return this.mode === 'demon';
},
isScreen() {
return this.mode === 'dp';
},
isScript() {
return this.mode === 'script';
},
isPlan() {
return this.mode === 'plan';
}
// isDrive() {
// return this.prdType == '04';
@ -227,7 +213,6 @@ export default {
EventBus.$on('clearCheckLogin', () => {
this.clearCheckLogin();
});
await this.setWindowSize();
await this.initLoadData();
this.switchMode('');
@ -329,20 +314,13 @@ export default {
//
async initLoadData() {
this.$store.dispatch('training/reset');
try {
await this.loadSimulationInfo();
if (this.isDemon) {
await this.initLoadDemonData();
} else if (this.isScreen) {
await this.initLoadScreenData();
} else if (this.isPlan) {
await this.initLoadTestRunData();
} else if (this.isScript) {
await this.initLoadTaskData();
}
this.checkLoginLineTimer();
this.checkMouseStatusTimer();
} catch (error) {
@ -362,18 +340,6 @@ export default {
this.endViewLoading();
}
},
//
async initLoadScreenData() {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.$store.dispatch('training/setPrdType', '01');
if (parseInt(this.mapId)) {
await this.loadMapDataById(this.mapId);
} else {
this.endViewLoading();
}
},
//
async initLoadTaskData() {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
@ -386,18 +352,6 @@ export default {
this.endViewLoading();
}
},
//
async initLoadTestRunData() {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.$store.dispatch('training/setPrdType', '01');
if (parseInt(this.mapId)) {
await this.loadMapDataById(this.mapId);
} else {
this.endViewLoading();
}
},
//
async runQuestLoadShow() {
this.$refs.addQuest.doShow();
@ -481,10 +435,6 @@ export default {
await this.$refs.lessonMenu.back();
} else if (this.isDemon) {
await this.$refs.menuDemon.back();
} else if (this.isScreen) {
await this.$refs.menuScreen.back();
} else if (this.isPlan) {
await this.$refs.menuPlan.back();
} else if (this.isScript) {
await this.$refs.menuScript.back();
}

View File

@ -22,14 +22,10 @@
@showScheduling="showScheduling"
/>
<menu-screen v-if="isScreen" ref="menuScreen" :offset="offset" :group="group" @tryTime="tryTime" />
<menu-plan v-if="isPlan" ref="menuPlan" :offset="offset" :group="group" />
<menu-script v-if="isScript" ref="menuScript" :offset="offset" :group="group" />
<menu-schema
v-if="isDemon || isPlan || isScript "
v-if="isDemon || isScript "
ref="menuSchema"
:offset="offset"
:group="group"
@ -54,10 +50,8 @@ import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
import MenuExam from '@/views/newMap/displayNew/menuExam';
import MenuLesson from '@/views/newMap/displayNew/menuLesson';
import MenuDemon from '@/views/newMap/displayNew/menuDemon';
import MenuScreen from '@/views/newMap/displayNew/menuScreen';
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import MenuPlan from '@/views/newMap/displayNew/menuPlan';
import MenuScript from '@/views/newMap/displayNew/menuScript';
import Scheduling from './demon/scheduling';
import { mapGetters } from 'vuex';
@ -82,9 +76,7 @@ export default {
MenuExam,
MenuLesson,
MapSystemDraft,
MenuPlan,
MenuDemon,
MenuScreen,
MenuScript,
MenuSchema,
MenuSystemTime,
@ -163,7 +155,7 @@ export default {
return this.$route.query.skinCode;
},
isLesson() {
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
return this.mode === 'teach' || this.mode === 'manage';
},
isExam() {
return this.mode === 'exam';
@ -171,15 +163,9 @@ export default {
isDemon() {
return this.mode === 'demon';
},
isScreen() { //
return this.mode === 'dp';
},
isScript() {
return this.mode === 'script';
},
isPlan() {
return this.mode === 'plan';
},
isDrive() {
return this.prdType == '04';
},
@ -338,22 +324,15 @@ export default {
//
async initLoadData() {
this.$store.dispatch('training/reset');
try {
await this.loadSimulationInfo();
if (this.isDemon) {
await this.initLoadDemonData();
} else if (this.isScreen) {
await this.initLoadScreenData();
} else if (this.isPlan) {
await this.initLoadTestRunData();
} else if (this.isScript) {
await this.initLoadTaskData();
} else {
await this.initLoadLessonOrExamData();
}
this.checkLoginLineTimer();
this.checkMouseStatusTimer();
} catch (error) {
@ -394,17 +373,6 @@ export default {
this.endViewLoading();
}
},
//
async initLoadScreenData() {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.$store.dispatch('training/setPrdType', '01');
if (parseInt(this.mapId)) {
await this.loadNewMapDataByGroup(this.group);
} else {
this.endViewLoading();
}
},
//
async initLoadTaskData() {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
@ -417,18 +385,6 @@ export default {
this.endViewLoading();
}
},
//
async initLoadTestRunData() {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.$store.dispatch('training/setPrdType', '01');
if (parseInt(this.mapId)) {
await this.loadNewMapDataByGroup(this.group);
} else {
this.endViewLoading();
}
},
//
async selectQuest(row, id, mapLocation, roleName) {
try {
@ -482,10 +438,6 @@ export default {
await this.$refs.lessonMenu.back();
} else if (this.isDemon) {
await this.$refs.menuDemon.back();
} else if (this.isScreen) {
await this.$refs.menuScreen.back();
} else if (this.isPlan) {
await this.$refs.menuPlan.back();
} else if (this.isScript) {
await this.$refs.menuScript.back();
}

View File

@ -1,141 +0,0 @@
<template>
<div class="display-draft">
<el-button-group>
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{ $t('display.plan.drivingByPlan') }}</el-button>
<el-button type="danger" :disabled="!isDisable" @click="end">{{ $t('display.plan.exitPlan') }}</el-button>
<el-button type="primary" @click="back">{{ $t('display.plan.back') }}</el-button>
</el-button-group>
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
</div>
</template>
<script>
import SetTime from './demon/setTime';
import { Notification } from 'element-ui';
import { runDiagramIsStart, runDiagramGetTime, runDiagramOver, runDiagramStart } from '@/api/simulation';
import { timeFormat } from '@/utils/date';
//
export default {
name: 'MenuPlan',
components: {
SetTime
},
props: {
group: {
type: String,
required: true
},
offset: {
type: Number,
required: true
}
},
data() {
return {
isDisable: false
};
},
watch: {
'$store.state.training.simulationGroupCount': function () {
this.initLoadPage();
}
},
methods: {
async initLoadPage() {
try {
const rest = '';//await runDiagramIsStart(this.group);
if (rest && rest.data) {
this.isDisable = true;
this.$store.dispatch('training/simulationStart');
} else {
this.isDisable = false;
this.$store.dispatch('training/over');
}
await this.loadSystemTime();
} catch (error) {
console.log(error);
}
},
async loadSystemTime() {
// const rest = await runDiagramGetTime(this.group);
// if (rest && rest.code == 200) {
// this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
// }
},
selectBeginTime() {
this.$refs.setTime.doShow();
},
start(model) {
this.isDisable = true;
runDiagramStart(model, this.group).then(res => {
this.$store.dispatch('training/simulationStart').then(() => {
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
});
}).catch(() => {
this.isDisable = false;
this.$messageBox(this.$t('display.plan.startPlanFail'));
});
},
end() {
this.isDisable = false;
runDiagramOver(this.group).then(() => {
this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => {
this.$store.dispatch('map/clearJlmapTrainView');
this.$store.dispatch('map/setTrainWindowShow', false);
});
});
}).catch(() => {
this.isDisable = true;
this.$messageBox(this.$t('display.plan.endPlanFail'));
});
},
async back() {
this.$store.dispatch('training/over').then(() => {
history.go(-1);
Notification.closeAll();
// exitFullscreen();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.display-card {
z-index: 9;
display: inline-block;
position: absolute;
top: 17px;
left: 160px;
height: 32px;
}
.display-card .el-row {
line-height: 32px !important;
}
.display-score {
background-color: black;
display: -moz-inline-box;
display: inline-block;
text-align: left;
height: 32px;
line-height: 24px;
border-radius: 4px;
padding-left: 2px;
margin-left: 10px;
font-family: "Microsoft" !important;
font-size: 18px !important;
color: #fff;
}
.display-draft {
position: absolute;
float: right;
right: 15px;
bottom: 15px;
}
</style>

View File

@ -1,180 +0,0 @@
<template>
<div>
<div>
<chart-view ref="chatView" :group="group" />
</div>
<div class="draft-box">
<div class="draft-menu">
<el-row>
<el-col :span="4">
<el-select v-model="speed" :placeholder="$t('display.replay.pleaseSelect')" @change="changeSpeed">
<el-option
v-for="item in optionsList"
:key="item.value"
:label="item.label"
size="mini"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="4">
<el-button type="primary" class="back btn" @click="play">{{ playName }}</el-button>
</el-col>
<el-col :span="12">
<el-progress class="progress" :percentage="progress" style="width: 100%" :show-text="false" />
</el-col>
<el-col :span="2">
<el-button type="primary" class="back" @click="back">{{ $t('display.replay.back') }}</el-button>
</el-col>
</el-row>
</div>
</div>
</div>
</template>
<!-- 回放界面 -->
<script>
import { Notification } from 'element-ui';
// import { exitFullscreen } from '@/utils/screen';
import { putsSimulationRecord, putsSimulationRecordPause, putsSimulationRecordPlay, putsSimulationRecordPlaySpeed, putsSimulationRecordplayTime } from '@/api/simulationRecord';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuReplay',
components: {
},
props: {
group: {
type: String,
required: true
},
offset: {
type: Number,
required: true
}
},
data() {
return {
isDisable: false,
startLoading: false,
speed: '1X',
level: 1,
isPlay: false,
time: '',
timeInterval: null,
progress: 0,
schedule: 0,
optionsList: [
{
label: '1X',
value: '1'
},
{
label: '2X',
value: '2'
},
{
label: '4X',
value: '4'
},
{
label: '8X',
value: '8'
}
]
};
},
computed: {
playName() {
return this.isPlay ? this.$t('display.replay.pause') : this.$t('display.replay.play');
}
},
watch: {
'$store.state.map.mapViewLoadedCount': function() {
this.isPlay = true;
}
},
mounted() {
EventBus.$emit('showChat');
this.time = (+new Date(this.$route.query.destroyTime) - +new Date(this.$route.query.createTime)) / 1000;
this.timeIntervals();
},
beforeDestroy() {
clearInterval(this.timeInterval);
this.timeInterval = null;
},
methods: {
timeIntervals() {
const timebili = 100 / this.time;
if (!this.timeInterval) {
this.timeInterval = setInterval(() => {
if (this.isPlay) {
this.progress += (this.level) * timebili;
if (this.progress >= 100) {
clearInterval(this.timeInterval);
this.timeInterval = null;
this.progress = 100;
this.isPlay = false;
}
}
}, 1000);
}
},
async play() {
this.isPlay = !this.isPlay;
if (this.isPlay) {
if (this.progress >= 100) {
this.progress = 0;
this.timeIntervals();
this.$refs.chatView.clearTextList();
await putsSimulationRecordplayTime(this.$route.query.replayId, 0);
} else {
await putsSimulationRecordPlay(this.$route.query.replayId);
}
} else {
await putsSimulationRecordPause(this.$route.query.replayId);
}
},
async changeSpeed(val) {
this.level = val;
await putsSimulationRecordPlaySpeed(this.$route.query.replayId, val);
},
async back() {
await putsSimulationRecord(this.$route.query.replayId);
history.go(-1);
Notification.closeAll();
// exitFullscreen();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.draft-box {
position: absolute;
display: inline;
bottom: 10px;
right: 0px;
.draft-menu {
position: static;
width: 800px;
float: right;
.back {
z-index: 100000;
/deep/ .el-button {
font-weight: bold;
}
}
.progress {
left: -30px;
position: relative;
top: 14px;
}
}
}
</style>

View File

@ -10,16 +10,16 @@
<!-- 加载剧本 -->
<el-button v-if="isDemon && !isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
<el-button v-if="!runing && !isPlan && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
<el-button v-if="!runing && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('display.schema.faultSetting') }}</el-button>
</el-button-group>
<el-radio-group v-if="!isPlan" v-model="mode" size="small" @change="changeOperateMode(mode)">
<el-radio-group v-model="mode" size="small" @change="changeOperateMode(mode)">
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('display.schema.faultOperation') }}</el-radio-button>
</el-radio-group>
</div>
<fault-choose v-if="isDemon || isPlan || isScript" ref="faultChoose" :group="group" />
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" />
<run-plan-Load ref="runPlanLoad" :group="group" />
<run-plan-view ref="runPlanView" :group="group" />
<!-- 加载剧本列表弹窗 -->
@ -76,9 +76,6 @@ export default {
notScript() {
return this.$route.params.mode !== 'script';
},
isPlan() {
return this.$route.params.mode === 'plan';
},
isScript() {
return this.$route.params.mode === 'script';
},
@ -112,28 +109,6 @@ export default {
this.viewDisabled = true;
getStationList(opt.mapId).then(response => {
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
if (this.$route.params.mode == 'plan') {
if (this.$route.query.from == 'user') {
//
getRpDetailByUserMapId(this.$route.query.planId).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data);
this.viewDisabled = false;
}).catch(() => {
this.$store.dispatch('runPlan/setPlanData', []);
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
});
} else {
//
queryRunPlan(this.$route.query.planId).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data);
this.viewDisabled = false;
}).catch(() => {
this.$store.dispatch('runPlan/setPlanData', []);
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
});
}
} else {
// getEveryDayRunPlanNew(this.group).then(resp => {
// this.$store.dispatch('runPlan/setPlanData', resp.data);
// this.viewDisabled = false;
@ -145,7 +120,7 @@ export default {
// this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
// }
// });
}
});
}).catch(() => {
this.$messageBox(this.$t('display.schema.getStationListFail'));

View File

@ -1,151 +0,0 @@
<template>
<div>
<div class="display-card" :style="{top: offset+'px'}">
<el-row>
<span v-if="countTime" class="display-score">{{ $t('display.screen.trialTime') }} {{ countTime }}</span>
</el-row>
</div>
</div>
</template>
<script>
import { getGoodsTryUse } from '@/api/management/goods';
import { PermissionType } from '@/scripts/ConstDic';
import { getCountTime } from '@/utils/index';
import { runDiagramIsStart, runDiagramGetTime, runDiagramStart } from '@/api/simulation';
import { timeFormat } from '@/utils/date';
export default {
name: 'MenuScreen',
props: {
group: {
type: String,
required: true
},
offset: {
type: Number,
required: true
}
},
data() {
return {
tryTime: 0, //
timeNow: 0, //
time: null, //
countTime: 0, //
remainingTime: 0,
goodsId: this.$route.query.goodsId,
try: this.$route.query.try, //
training: {
id: '',
name: '',
remarks: ''
}
};
},
watch: {
'$store.state.training.subscribeCount': function () {
this.group && this.initLoadPage();
}
},
beforeDestroy() {
if (this.time) {
this.setTryTime();
clearTimeout(this.time);
}
},
methods: {
async initLoadPage() {
try {
if (this.try != '0') {
const data = {
permissionType: PermissionType.SCREEN
};
const resr = await getGoodsTryUse(data);
if (resr && resr.code == 200) {
this.remainingTime = resr.data.tryTime;
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
if (this.try) {
this.time = setInterval(() => {
this.tryTime += 1;
this.countTime = getCountTime(this.timeNow);
if (this.countTime == -1) {
this.back();
}
}, 1000);
}
} else {
this.$messageBox(this.$t('display.screen.getTimeFail'));
}
}
const initTime = this.$route.query.initTime;
const retp = '';//await runDiagramIsStart(this.group);
if (retp && !retp.data) {
await runDiagramStart({ initTime: initTime }, this.group);
}
await this.$store.dispatch('training/simulationStart');
await this.loadSystemTime();
} catch (error) {
console.log(error);
}
},
async loadSystemTime() {
// const rest = await runDiagramGetTime(this.group);
// if (rest && rest.code == 200) {
// this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
// }
},
setTryTime() {
if (this.try) {
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
}
},
back() {
this.$store.dispatch('training/over').then(() => {
Notification.closeAll();
history.go(-1);
// exitFullscreen();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.display-card {
z-index: 9;
display: inline;
position: absolute;
top: 17px;
left: 30px;
}
.display-card .el-row {
line-height: 32px !important;
}
.display-score {
background-color: black;
display: -moz-inline-box;
display: inline-block;
text-align: left;
height: 32px;
line-height: 24px;
border-radius: 4px;
padding-left: 2px;
margin-left: 10px;
font-family: "Microsoft" !important;
font-size: 18px !important;
color: #fff;
}
.display-draft {
position: absolute;
float: right;
right: 15px;
bottom: 15px;
}
</style>

View File

@ -97,21 +97,19 @@ export default {
},
computed: {
formTop() {
const form = {
return {
labelWidth: '220px',
items: [
{ prop: 'gatewayCode', label: '网关编码:', type: 'select', required: true, options: this.gatewayList, placeholder: '请选择网关编码' }
]
};
return form;
},
topRules() {
const crules = {
return {
gatewayCode: [
{ required: true, message: '请输入网关编码', trigger: 'change' }
]
};
return crules;
},
title() {
return '编辑设备配置';