This commit is contained in:
fan 2020-06-11 18:36:25 +08:00
commit c8b2f4cfa7
8 changed files with 181 additions and 38 deletions

View File

@ -54,6 +54,7 @@ import ChatSetting from './chatSetting';
import ChatContent from './chatContent';
import ChatCreateGroup from './chatCreateGroup';
import ChatMemberList from './chatMemberList';
import ChatTooltip from './chatTooltip';
import ChatCoversitionList from './chatCoversitionList';
import RecordRTC from 'recordrtc';
import {uploadAudioFileNew, quitCoversition} from '@/api/chat';
@ -64,7 +65,8 @@ export default {
ChatContent,
ChatMemberList,
ChatCoversitionList,
ChatCreateGroup
ChatCreateGroup,
ChatTooltip
},
props: {
group: {

View File

@ -12,12 +12,16 @@
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
</el-button-group>
</div>
<chat-box ref="chatbox" :group="group" :user-role="userRole" />
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<tip-script-record-new ref="tipTaskRecordNew" :group="group" :offset-bottom="offsetBottom" />
</div>
</template>
<!-- 单人仿真 -->
<script>
import ChatBox from './chatView/chatBox';
import TipScriptRecordNew from '@/views/scriptManage/display/tipScriptRecordNew';
import SetTime from './demon/setTime';
import { Notification } from 'element-ui';
import { ranAsPlan, exitRunPlan } from '@/api/simulation';
@ -28,7 +32,9 @@ import { mapGetters } from 'vuex';
export default {
name: 'MenuTask',
components: {
SetTime
SetTime,
ChatBox,
TipScriptRecordNew
},
props: {
group: {
@ -70,7 +76,18 @@ export default {
},
...mapGetters('map', [
'trainList'
])
]),
userRole() {
if (this.$store.state.training.prdType == '02') {
return 'DISPATCHER';
} else if (this.$store.state.training.prdType == '01') {
return 'STATION_SUPERVISOR';
} else if (this.$store.state.training.prdType == '04') {
return 'DRIVER';
} else {
return 'AUDIENCE';
}
}
},
watch: {
'$store.state.training.subscribeCount': function () {

View File

@ -54,14 +54,17 @@ export default {
pause() {
return this.$store.state.scriptRecord.simulationPause;
},
isDisplay() {
return this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew');
},
isShowDate() {
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.$route.path.includes('displayNew');
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.isDisplay;
},
top() {
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.$route.path.includes('displayNew') ? 35 : this.offset;
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.isDisplay ? 35 : this.offset;
},
newRight() {
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.$route.path.includes('displayNew') ? this.$store.state.config.width - 340 - 80 : this.right;
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.isDisplay ? this.$store.state.config.width - 340 - 80 : this.right;
}
},
watch: {

View File

@ -38,7 +38,7 @@ export default {
methods: {
setPosition() {
this.$nextTick(() => {
let offset = this.$route.path.includes('displayNew') && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
let offset = (this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew')) && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
const menuBar = document.getElementById('menuBar');
const menuTool = document.getElementById('menuTool');
if (menuBar) {

View File

@ -1,6 +1,6 @@
<template>
<div style="height:100%">
<div style="height: calc(100% - 46px);">
<div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="showDelimiter" label-width="180px" size="mini">
<el-form-item label="逻辑区段数量">
@ -9,17 +9,18 @@
<el-form-item label="是否显示分隔符">
<el-checkbox v-model="isDelimiter" />
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
</el-form-item>
<el-form-item label="区段名称偏移Y坐标">
<el-input-number v-model="distanceY" />
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="editSectionDistance">{{ $t('map.updateObj') }}</el-button>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
</el-button-group>
</div>
</div>
</template>
<script>
@ -74,6 +75,9 @@ export default {
this.editModel.logicSectionCodeList.forEach(logicCode => {
const section = this.$store.getters['map/getDeviceByCode'](logicCode);
models.push(deepAssign(section, {_dispose: true}));
const trainWindowModel = this.$store.getters['map/getDeviceByCode'](section.trainWindowCode);
models.push(deepAssign(trainWindowModel, {_dispose: true}));
});
if (this.logicNum === 0) {
logicSectionCodeList = [];
@ -209,6 +213,16 @@ export default {
//
computedLogicSectionNumList(logicSectionCodeList) {
this.logicNum = logicSectionCodeList ? logicSectionCodeList.length : 0;
},
//
editSectionDistance() {
const models = [];
this.editModel.logicSectionCodeList.forEach(logicCode => {
const logicSection = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicCode));
logicSection.namePosition = { x: 0, y: this.distanceY };
models.push(logicSection);
});
this.$emit('updateMapModel', models, 'four');
}
}
};

View File

@ -1,32 +1,33 @@
<template>
<div class="script-parent">
<div class="script-card" :style="{width: widthLeft+'px'}">
<tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" />
</div>
<drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" />
<div class="script-display">
<display ref="display" :size="size" />
</div>
<!-- <div class="script-card" :style="{width: widthLeft+'px'}"> -->
<!-- <tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" /> -->
<!-- </div> -->
<!-- <drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" /> -->
<!-- <div class="script-display"> -->
<display ref="display" :size="size" />
<!-- <tip-script-record-new ref="tipTaskRecordNew" :group="group" /> -->
<!-- </div> -->
</div>
</template>
<script>
import Display from '@/views/newMap/displayNew/index';
import TipScriptRecord from './tipScriptRecord';
import drapLeft from '@/views/components/drapLeft/index';
// import TipScriptRecordNew from './tipScriptRecordNew';
// import drapLeft from '@/views/components/drapLeft/index';
export default {
name: 'ScriptDisplayNew',
components: {
Display,
TipScriptRecord,
drapLeft
Display
// TipScriptRecordNew
// drapLeft
},
data() {
return {
widthLeft: 780,
// widthLeft: 780,
size: {
width: document.documentElement.clientWidth - 780,
width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight
},
group: this.$route.query.group
@ -34,11 +35,11 @@ export default {
},
watch: {
'$store.state.app.windowSizeCount': function() {
this.size = { width: this.$store.state.app.width - 780, height: this.$store.state.app.height};
},
widthLeft: function(val) {
this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
this.size = { width: this.$store.state.app.width, height: this.$store.state.app.height};
}
// widthLeft: function(val) {
// this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
// }
},
methods: {
drapWidth(width) {
@ -49,11 +50,4 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.script-parent {
display: flex;
flex-flow: row;
.script-card {
width: 780px;
}
}
</style>

View File

@ -0,0 +1,108 @@
<template>
<div>
<div class="scriptRecordNew" :style="{bottom:(offsetBottom-15)+'px'}">
<div v-show="isShow" class="scriptRecordNewIn">
<el-tabs type="card">
<el-tab-pane :label="$t('scriptRecord.scriptRecordTitle')+'('+language+')'">
<div style="padding:0px 10px;height: 240px;" />
</el-tab-pane>
<el-tab-pane label="选择剧本角色">
<div style="padding:0px 10px;height: 240px;">
<add-role ref="addRole" :group="group" @refresh="refresh" />
</div>
</el-tab-pane>
</el-tabs>
</div>
<div class="scriptRecordNewTitle" @click="minisize">
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
<!-- <span class="titleStyle">( {{ $t('scriptRecord.language') }}: {{ $route.query.lang=="en"?$t('scriptRecord.english'):$t('scriptRecord.chinese') }} )</span> -->
</div>
</div>
<!-- <div class="selectRoles">
<div class="selectRolesTitle">选择成员角色</div>
<add-role ref="addRole" :group="group" @refresh="refresh" />
</div> -->
</div>
</template>
<script>
import AddRole from '../scriptRecord/addRole';
export default {
name:'TipScriptRecordNew',
components: {
AddRole
},
props: {
group: {
type: String,
required: true
},
offsetBottom:{
type: Number,
required: true
}
},
data() {
return {
isShow:true,
language:''
};
},
mounted() {
this.language = this.$route.query.lang == 'en' ? this.$t('scriptRecord.english') : this.$t('scriptRecord.chinese');
},
methods:{
refresh() {
},
minisize() {
if (this.isShow) {
this.isShow = false;
} else {
this.isShow = true;
}
}
}
};
</script>
<style lang="scss" scoped>
// .selectRoles{
// position: absolute;
// width: 700px;
// left: 5px;
// bottom: 424px;
// z-index: 10;
// background: #fff;
// height: 200px;
// border-radius: 5px;
// }
.selectRolesTitle{
}
.scriptRecordNew{
position: absolute;
width: 700px;
max-height: 400px;
z-index: 10;
padding-top: 28px;
left: 50%;
bottom: 0px;
transform: translateX(-50%) translateY(0);
}
.scriptRecordNewTitle{
position: absolute;
background: #fff;
border-radius: 5px 5px 0px 0px ;
padding: 5px 0px;
width: 100px;
text-align: center;
left: 50%;
transform: translateX(-50%);
cursor: pointer;
top:0;
}
.scriptRecordNewIn{
padding: 10px;
background: #fff;
border-radius: 5px 5px 0px 0px ;
box-shadow: -1px -1px 3px #656565;
}
</style>

View File

@ -11,6 +11,7 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('scriptRecord.receiver')" class="conditionVO" prop="actionVO.targetId">
<!-- multiple -->
<el-select v-model="modalData.actionVO.targetId" :placeholder="$t('scriptRecord.receiverRules')" :disabled="isPause&&isNotModify">
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id" />
</el-select>
@ -545,6 +546,10 @@ export default {
},
changeItem() {
if (!(this.isPause && this.isNotModify)) {
// debugger;
// if (this.modalData.actionVO.targetId) {
// }
const temp = this.modalData.actionVO.memberId;
this.modalData.actionVO.memberId = this.modalData.actionVO.targetId;
this.modalData.actionVO.targetId = temp;