This commit is contained in:
fan 2023-06-01 09:40:58 +08:00
commit 0f22d3c818
9 changed files with 152 additions and 48 deletions

View File

@ -182,3 +182,10 @@ export function importTrainingData(data) {
data data
}); });
} }
/** 实训跳转到当前步骤*/
export function jumpToTraining(group, stepId) {
return request({
url: `/api/training2Simulation/${group}/jumpTo/${stepId}`,
method: 'put'
});
}

View File

@ -516,7 +516,9 @@ export default {
CMD_Conversation_Group_Text_Chat: {value: 'Conversation_Group_Text_Chat', label: '发送会话群文字消息'}, CMD_Conversation_Group_Text_Chat: {value: 'Conversation_Group_Text_Chat', label: '发送会话群文字消息'},
CMD_Conversation_Group_Audio_Base64: {value: 'Conversation_Group_Audio_Base64', label: '发送会话群语音消息'}, CMD_Conversation_Group_Audio_Base64: {value: 'Conversation_Group_Audio_Base64', label: '发送会话群语音消息'},
CMD_Conversation_Group_Private_Text_Chat: {value: 'Conversation_Group_Private_Text_Chat', label: '发送私聊文字消息'}, CMD_Conversation_Group_Private_Text_Chat: {value: 'Conversation_Group_Private_Text_Chat', label: '发送私聊文字消息'},
CMD_Conversation_Group_Private_Audio_Base64: {value: 'Conversation_Group_Private_Audio_Base64', label: '发送私聊语音消息'} CMD_Conversation_Group_Private_Audio_Base64: {value: 'Conversation_Group_Private_Audio_Base64', label: '发送私聊语音消息'},
CMD_Conversation_Group_Create: {value: 'Conversation_Group_Create', label: '创建会话群'},
CMD_Conversation_Group_Invite_Member: {value: 'Conversation_Group_Invite_Member', label: '邀请人员入群'}
}, },
PSL: { PSL: {
CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'} CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'}

View File

@ -4389,11 +4389,11 @@ export const OperationEvent = {
}, },
moonDay: { moonDay: {
operation: 'b101', operation: 'b101',
domId: '_Tips-TicketOrRegister-RegisterInput-MoonDay' domId: '_Tips-TicketOrRegister-RegisterInput-MoonDay{BOTTOM}'
}, },
hourMinute: { hourMinute: {
operation: 'b102', operation: 'b102',
domId: '_Tips-TicketOrRegister-RegisterInput-HourMinute' domId: '_Tips-TicketOrRegister-RegisterInput-HourMinute{BOTTOM}'
}, },
result: { result: {
operation: 'b103', operation: 'b103',
@ -4401,11 +4401,11 @@ export const OperationEvent = {
}, },
noticeTimeMoonDay: { noticeTimeMoonDay: {
operation: 'b104', operation: 'b104',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeMoonDay' domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeMoonDay{BOTTOM}'
}, },
noticeTimeHourMinute: { noticeTimeHourMinute: {
operation: 'b105', operation: 'b105',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeHourMinute' domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeHourMinute{BOTTOM}'
}, },
noticeTimeInfo: { noticeTimeInfo: {
operation: 'b106', operation: 'b106',
@ -4413,11 +4413,11 @@ export const OperationEvent = {
}, },
arriveTimeMoonDay: { arriveTimeMoonDay: {
operation: 'b107', operation: 'b107',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeMoonDay' domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeMoonDay{BOTTOM}'
}, },
arriveTimeHourMinute: { arriveTimeHourMinute: {
operation: 'b108', operation: 'b108',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeHourMinute' domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeHourMinute{BOTTOM}'
}, },
arriveTimeInfo: { arriveTimeInfo: {
operation: 'b109', operation: 'b109',
@ -4425,11 +4425,11 @@ export const OperationEvent = {
}, },
endTimeMoonDay: { endTimeMoonDay: {
operation: 'b110', operation: 'b110',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeMoonDay' domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeMoonDay{BOTTOM}'
}, },
endTimeHourMinute: { endTimeHourMinute: {
operation: 'b111', operation: 'b111',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeHourMinute' domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeHourMinute{BOTTOM}'
}, },
endTimeInfo: { endTimeInfo: {
operation: 'b112', operation: 'b112',
@ -5027,7 +5027,7 @@ export const OperationEvent = {
}, },
requestDate:{ requestDate:{
operation: '120a', operation: '120a',
domId: '_Tips-Rail-equipmentConstructionFill-requestDate' domId: '_Tips-Rail-equipmentConstructionFill-requestDate{BOTTOM}'
}, },
requestDetails:{ requestDetails:{
operation: '120b', operation: '120b',
@ -5035,7 +5035,7 @@ export const OperationEvent = {
}, },
planSpendTime:{ planSpendTime:{
operation: '120c', operation: '120c',
domId: '_Tips-Rail-equipmentConstructionFill-planSpendTime' domId: '_Tips-Rail-equipmentConstructionFill-planSpendTime{BOTTOM}'
}, },
acceptDetail:{ acceptDetail:{
operation: '120d', operation: '120d',
@ -5043,7 +5043,7 @@ export const OperationEvent = {
}, },
confirmReviewDate:{ confirmReviewDate:{
operation: '120e', operation: '120e',
domId: '_Tips-Rail-equipmentConstructionFill-confirmReviewDate' domId: '_Tips-Rail-equipmentConstructionFill-confirmReviewDate{BOTTOM}'
}, },
confirmReviewDetail:{ confirmReviewDetail:{
operation: '120f', operation: '120f',
@ -5165,6 +5165,14 @@ export const OperationEvent = {
record: { record: {
operation: '1403', operation: '1403',
domId: '_Tips-Conversation-Chat-record' domId: '_Tips-Conversation-Chat-record'
},
createGroup: {
operation: '1404',
domId: '_Tips-Conversation-Chat-createGroup'
},
inviteToGroup: {
operation: '1405',
domId: '_Tips-Conversation-Chat-inviteToGroup'
} }
} }
}, },

View File

@ -33,8 +33,8 @@
<div class="activeLine" /> <div class="activeLine" />
</div> </div>
<div class="nullDiv" /> <div class="nullDiv" />
<div class="editFilter " :class="myMemberId ? 'pointer' : 'disable'"> <div class="editFilter" :class="myMemberId ? 'pointer' : 'disable'">
<i class="el-icon-plus" title="创建会话群" @click="createGroup" /> <i :id="createGroupDomId" class="el-icon-plus" title="创建会话群" @click="createGroup" />
<!-- <i class="el-icon-more" /> --> <!-- <i class="el-icon-more" /> -->
</div> </div>
</div> </div>
@ -63,7 +63,7 @@
<address-book ref="addressBook" :member-tree-data="memberTreeData" @sendPrivateMsg="sendPrivateMsg" /> <address-book ref="addressBook" :member-tree-data="memberTreeData" @sendPrivateMsg="sendPrivateMsg" />
</div> </div>
</div> </div>
<edit-group ref="editGroup" :member-tree-data="memberTreeData" /> <edit-group ref="editGroup" :member-tree-data="memberTreeData" @handleEditGroup="handleEditGroup" />
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<dialog-member ref="dialogMember" :member-tree-data="memberTreeData" @updateLeaderId="updateLeaderId" /> <dialog-member ref="dialogMember" :member-tree-data="memberTreeData" @updateLeaderId="updateLeaderId" />
</el-dialog> </el-dialog>
@ -79,6 +79,7 @@ import AddressBook from './addressBook';
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import DialogMember from './dialogMember'; import DialogMember from './dialogMember';
import { objectIsEqual } from '@/utils/date'; import { objectIsEqual } from '@/utils/date';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default { export default {
name: 'ChatDialog', name: 'ChatDialog',
components: { components: {
@ -95,6 +96,7 @@ export default {
return { return {
logoImgUrl: '', logoImgUrl: '',
dialogVisible: false, dialogVisible: false,
showEditGroup: false,
tabs: [ tabs: [
{label:'消息', icon:'el-icon-chat-dot-square'}, {label:'消息', icon:'el-icon-chat-dot-square'},
{label:'通讯录', icon:'el-icon-notebook-1'} {label:'通讯录', icon:'el-icon-notebook-1'}
@ -119,6 +121,9 @@ export default {
groupId() { groupId() {
return this.$route.query.group; return this.$route.query.group;
}, },
createGroupDomId() {
return this.showEditGroup ? '' : OperationEvent.Conversation.Chat.createGroup.domId;
},
myMemberId() { myMemberId() {
return this.$store.state.training.myMemberId; return this.$store.state.training.myMemberId;
}, },
@ -275,6 +280,9 @@ export default {
this.handleClose(); this.handleClose();
}, },
methods: { methods: {
handleEditGroup(val) {
this.showEditGroup = val;
},
showMenu(event, item) { showMenu(event, item) {
this.groupClick(item); this.groupClick(item);
this.initMenu(item); this.initMenu(item);

View File

@ -59,7 +59,7 @@
</el-form-item> --> </el-form-item> -->
<el-form-item v-if="showSubmitBtn"> <el-form-item v-if="showSubmitBtn">
<el-button @click="handleClose">取消</el-button> <el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="onSubmit">确定</el-button> <el-button :id="submitDomId" type="primary" @click="onSubmit">确定</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -69,8 +69,11 @@
</template> </template>
<script> <script>
import { createGroup, inviteMemberToGroup } from '@/api/newChat'; import { inviteMemberToGroup } from '@/api/newChat';
import { getUploadUrl } from '@/api/projectConfig'; import { getUploadUrl } from '@/api/projectConfig';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {UserOperationType} from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default { export default {
name: 'EditGroup', name: 'EditGroup',
components: { components: {
@ -118,6 +121,15 @@ export default {
groupId() { groupId() {
return this.$route.query.group; return this.$route.query.group;
}, },
submitDomId() {
let domId = '';
if (this.title == '邀请成员') {
domId = OperationEvent.Conversation.Chat.inviteToGroup.domId;
} else if (this.title == '创建会话群') {
domId = OperationEvent.Conversation.Chat.createGroup.domId;
}
return this.dialogVisible ? domId : '';
},
memberData() { memberData() {
return this.$store.state.training.memberData; return this.$store.state.training.memberData;
}, },
@ -155,6 +167,12 @@ export default {
this.treeDisabled = true; this.treeDisabled = true;
this.nameDisabled = true; this.nameDisabled = true;
} }
},
dialogVisible() {
this.$emit('handleEditGroup', this.dialogVisible);
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
} }
}, },
mounted() { mounted() {
@ -231,21 +249,27 @@ export default {
}).catch(err => { }).catch(err => {
this.$message.error(`邀请成员失败!${err.message}`); this.$message.error(`邀请成员失败!${err.message}`);
}); });
} else if (this.title == '创建会话群') { } else if (this.title == '创建会话群') {
const list = []; const list = [];
this.selectTreeNode.forEach(item => { this.selectTreeNode.forEach(item => {
list.push(item.id); list.push(item.id);
}); });
const params = { const operate = {
name: this.form.name, over: true,
imageUrl: this.form.imageUrl, cmdType: CMD.Conversation.CMD_Conversation_Group_Create,
memberIds: list operation: OperationEvent.Conversation.Chat.createGroup.operation,
userOperationType: UserOperationType.LEFTCLICK,
param: {
name: this.form.name,
memberIds: list
}
}; };
createGroup(this.groupId, params).then(res => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.initData(); if (valid) {
this.handleClose(); this.initData();
this.$message.success('创建会话群成功!'); this.handleClose();
this.$message.success('创建会话群成功!');
}
}).catch(err => { }).catch(err => {
this.$message.error(`创建会话群失败!${err.message}`); this.$message.error(`创建会话群失败!${err.message}`);
}); });

View File

@ -21,9 +21,10 @@
<span v-else>{{ scope.row.projectName }}</span> <span v-else>{{ scope.row.projectName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="requestDate" :label="'月日\n时分'" width="80"> <el-table-column prop="requestDate" :label="'月日\n时分'" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.requestDate.domId" v-model="scope.row.requestDate" @blur="requestDateChange(scope.row.requestDate)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="constructionFill.requestDate.domId" v-model="scope.row.requestDate" @blur="requestDateChange(scope.row.requestDate)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="constructionFill.requestDate.domId" v-model="scope.row.requestDate" format="M月d日 HH:mm" value-format="M月d日 HH:mm" class="dateClass" :clearable="false" type="datetime" @change="requestDateChange(scope.row.requestDate)" />
<span v-else>{{ scope.row.requestDate }}</span> <span v-else>{{ scope.row.requestDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -33,9 +34,10 @@
<span v-else>{{ scope.row.requestDetails }}</span> <span v-else>{{ scope.row.requestDetails }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="planSpendTime" :label="'所需\n时分'" width="80"> <el-table-column prop="planSpendTime" :label="'所需\n时分'" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.planSpendTime.domId" v-model="scope.row.planSpendTime" @blur="planSpendTimeChange(scope.row.planSpendTime)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="constructionFill.planSpendTime.domId" v-model="scope.row.planSpendTime" @blur="planSpendTimeChange(scope.row.planSpendTime)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="constructionFill.planSpendTime.domId" v-model="scope.row.planSpendTime" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="planSpendTimeChange(scope.row.planSpendTime)" />
<span v-else>{{ scope.row.planSpendTime }}</span> <span v-else>{{ scope.row.planSpendTime }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -49,9 +51,10 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="施工后开通检查确认、销记"> <el-table-column label="施工后开通检查确认、销记">
<el-table-column prop="confirmReviewDate" :label="'月日\n时分'" width="80"> <el-table-column prop="confirmReviewDate" :label="'月日\n时分'" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.confirmReviewDate.domId" v-model="scope.row.confirmReviewDate" @blur="confirmReviewDateChange(scope.row.confirmReviewDate)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="constructionFill.confirmReviewDate.domId" v-model="scope.row.confirmReviewDate" @blur="confirmReviewDateChange(scope.row.confirmReviewDate)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="constructionFill.confirmReviewDate.domId" v-model="scope.row.confirmReviewDate" format="M月d日 HH:mm" value-format="M月d日 HH:mm" class="dateClass" :clearable="false" type="datetime" @change="confirmReviewDateChange(scope.row.confirmReviewDate)" />
<span v-else>{{ scope.row.confirmReviewDate }}</span> <span v-else>{{ scope.row.confirmReviewDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -253,7 +256,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.equipmentConstructionTable{ .equipmentConstructionTable{
width:91%;margin-left:15px width: 100%;
} }
.el-table .cell { .el-table .cell {
white-space: pre-line; white-space: pre-line;
@ -262,4 +265,14 @@ export default {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.dateClass {
width: 139px;
}
.timeClass {
width: 79px;
}
/deep/ .el-input--suffix .el-input__inner {
padding-right: 10px;
padding-left: 28px;
}
</style> </style>

View File

@ -11,15 +11,17 @@
style="width: 100%" style="width: 100%"
:height="tableHeight" :height="tableHeight"
> >
<el-table-column prop="date" label="月 日" width="95"> <el-table-column prop="date" label="月 日" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.moonDay.domId" v-model="scope.row.moonDay" @blur="moonDayChange(scope.row.moonDay)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.moonDay.domId" v-model="scope.row.moonDay" @blur="moonDayChange(scope.row.moonDay)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="registerInput.moonDay.domId" v-model="scope.row.moonDay" format="M月d日" value-format="M月d日" class="dateClass" :clearable="false" type="date" @change="moonDayChange(scope.row.moonDay)" />
<span v-else>{{ scope.row.moonDay }}</span> <span v-else>{{ scope.row.moonDay }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="time" label="时 分" width="95"> <el-table-column prop="time" label="时 分" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.hourMinute.domId" v-model="scope.row.hourMinute" @blur="hourMinuteChange(scope.row.hourMinute)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.hourMinute.domId" v-model="scope.row.hourMinute" @blur="hourMinuteChange(scope.row.hourMinute)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="registerInput.hourMinute.domId" v-model="scope.row.hourMinute" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="hourMinuteChange(scope.row.hourMinute)" />
<span v-else>{{ scope.row.hourMinute }}</span> <span v-else>{{ scope.row.hourMinute }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -30,15 +32,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="通 知 时 间"> <el-table-column label="通 知 时 间">
<el-table-column prop="noticeDate" label="月 日" width="100"> <el-table-column prop="noticeDate" label="月 日" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeMoonDay.domId" v-model="scope.row.noticeTime.moonDay" @blur="noticeTimeMoonDayChange(scope.row.noticeTime.moonDay)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeMoonDay.domId" v-model="scope.row.noticeTime.moonDay" @blur="noticeTimeMoonDayChange(scope.row.noticeTime.moonDay)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeMoonDay.domId" v-model="scope.row.noticeTime.moonDay" format="M月d日" value-format="M月d日" class="dateClass" :clearable="false" type="date" @change="noticeTimeMoonDayChange(scope.row.noticeTime.moonDay)" />
<span v-else>{{ scope.row.noticeTime.moonDay }}</span> <span v-else>{{ scope.row.noticeTime.moonDay }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="noticeTime" label="时 分" width="100"> <el-table-column prop="noticeTime" label="时 分" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeHourMinute.domId" v-model="scope.row.noticeTime.hourMinute" @blur="noticeTimeHourMinuteChange(scope.row.noticeTime.hourMinute)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeHourMinute.domId" v-model="scope.row.noticeTime.hourMinute" @blur="noticeTimeHourMinuteChange(scope.row.noticeTime.hourMinute)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeHourMinute.domId" v-model="scope.row.noticeTime.hourMinute" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="noticeTimeHourMinuteChange(scope.row.noticeTime.hourMinute)" />
<span v-else>{{ scope.row.noticeTime.hourMinute }}</span> <span v-else>{{ scope.row.noticeTime.hourMinute }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -50,15 +54,17 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="到 达 时 间"> <el-table-column label="到 达 时 间">
<el-table-column prop="arriveDate" label="月 日" width="100"> <el-table-column prop="arriveDate" label="月 日" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeMoonDay.domId" v-model="scope.row.arriveTime.moonDay" @blur="arriveTimeMoonDayChange(scope.row.arriveTime.moonDay)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeMoonDay.domId" v-model="scope.row.arriveTime.moonDay" @blur="arriveTimeMoonDayChange(scope.row.arriveTime.moonDay)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeMoonDay.domId" v-model="scope.row.arriveTime.moonDay" format="M月d日" value-format="M月d日" class="dateClass" :clearable="false" type="date" @change="arriveTimeMoonDayChange(scope.row.arriveTime.moonDay)" />
<span v-else>{{ scope.row.arriveTime.moonDay }}</span> <span v-else>{{ scope.row.arriveTime.moonDay }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="arriveTime" label="时 分" width="100"> <el-table-column prop="arriveTime" label="时 分" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeHourMinute.domId" v-model="scope.row.arriveTime.hourMinute" @blur="arriveTimeHourMinuteChange(scope.row.arriveTime.hourMinute)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeHourMinute.domId" v-model="scope.row.arriveTime.hourMinute" @blur="arriveTimeHourMinuteChange(scope.row.arriveTime.hourMinute)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeHourMinute.domId" v-model="scope.row.arriveTime.hourMinute" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="arriveTimeHourMinuteChange(scope.row.arriveTime.hourMinute)" />
<span v-else>{{ scope.row.arriveTime.hourMinute }}</span> <span v-else>{{ scope.row.arriveTime.hourMinute }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -70,15 +76,17 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="销除不良及破损的时分及盖章"> <el-table-column label="销除不良及破损的时分及盖章">
<el-table-column prop="repairDate" label="月 日" width="100"> <el-table-column prop="repairDate" label="月 日" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeMoonDay.domId" v-model="scope.row.endTime.moonDay" @blur="endTimeMoonDayChange(scope.row.endTime.moonDay)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeMoonDay.domId" v-model="scope.row.endTime.moonDay" @blur="endTimeMoonDayChange(scope.row.endTime.moonDay)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="registerInput.endTimeMoonDay.domId" v-model="scope.row.endTime.moonDay" format="M月d日" value-format="M月d日" class="dateClass" :clearable="false" type="date" @change="endTimeMoonDayChange(scope.row.endTime.moonDay)" />
<span v-else>{{ scope.row.endTime.moonDay }}</span> <span v-else>{{ scope.row.endTime.moonDay }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="repairTime" label="时 分" width="100"> <el-table-column prop="repairTime" label="时 分" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeHourMinute.domId" v-model="scope.row.endTime.hourMinute" @blur="endTimeHourMinuteChange(scope.row.endTime.hourMinute)" /> <!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeHourMinute.domId" v-model="scope.row.endTime.hourMinute" @blur="endTimeHourMinuteChange(scope.row.endTime.hourMinute)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="registerInput.endTimeHourMinute.domId" v-model="scope.row.endTime.hourMinute" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="endTimeHourMinuteChange(scope.row.endTime.hourMinute)" />
<span v-else>{{ scope.row.endTime.hourMinute }}</span> <span v-else>{{ scope.row.endTime.hourMinute }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -304,6 +312,15 @@ export default {
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
.dateClass {
width: 99px;
}
.timeClass {
width: 79px;
}
/deep/ .el-input--suffix .el-input__inner {
padding-right: 10px;
padding-left: 28px;
}
</style> </style>

View File

@ -351,6 +351,7 @@ export default {
list.push(obj); list.push(obj);
}); });
await updateTrainingStep(this.group, this.editData.id, { step2VOList: list, playerIdList: this.playerIdList }); await updateTrainingStep(this.group, this.editData.id, { step2VOList: list, playerIdList: this.playerIdList });
this.getStepList(this.editData);
this.$message.success('保存实训成功!'); this.$message.success('保存实训成功!');
} catch { } catch {
this.$message.error('保存实训失败'); this.$message.error('保存实训失败');

View File

@ -1,6 +1,8 @@
<template> <template>
<div> <div>
<div style="text-align: right;padding-right: 10px;"> <div style="text-align: right;padding-right: 10px;">
<el-button v-if="showJumpToTraining" size="small" type="text" @click="jumpToTraining">仿真到当前步骤</el-button>
<el-divider v-if="showJumpToTraining" direction="vertical" />
<el-button size="small" type="text" @click="clearOperation">清空</el-button> <el-button size="small" type="text" @click="clearOperation">清空</el-button>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<el-button size="small" type="text" @click="backDesignPane">返回</el-button> <el-button size="small" type="text" @click="backDesignPane">返回</el-button>
@ -36,6 +38,7 @@
<script> <script>
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { jumpToTraining} from '@/api/trainingManage';
export default { export default {
name: 'EditOperateNew', name: 'EditOperateNew',
data() { data() {
@ -48,6 +51,18 @@ export default {
stepIndex: '' stepIndex: ''
}; };
}, },
computed: {
showJumpToTraining() {
let s = false;
if (this.stepDetail.id) {
s = true;
}
return s;
},
group() {
return this.$route.query.group;
}
},
watch: { watch: {
'$store.state.trainingNew.trainingOperate': function (val) { '$store.state.trainingNew.trainingOperate': function (val) {
if (val && this.editMode) { if (val && this.editMode) {
@ -97,6 +112,15 @@ export default {
this.$store.dispatch('trainingNew/editDraftStepList', null); this.$store.dispatch('trainingNew/editDraftStepList', null);
}, },
methods: { methods: {
jumpToTraining() {
if (this.group && this.stepDetail.id) {
jumpToTraining(this.group, this.stepDetail.id).then(res => {
console.log(res, '跳转成功!');
}).catch(err => {
this.$message.error(`跳转失败!${err.message}`);
});
}
},
initData(data) { initData(data) {
this.editMode = true; this.editMode = true;
this.stepIndex = data.index; this.stepIndex = data.index;