Merge branch 'test' of git.code.tencent.com:lian-cbtc/jl-client into yly
This commit is contained in:
commit
ac9f9c7675
@ -57,7 +57,7 @@
|
|||||||
<menu-panel v-if="isCtc" ref="menuPanel" />
|
<menu-panel v-if="isCtc" ref="menuPanel" />
|
||||||
<stage-runplan v-if="isCtc" ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
|
<stage-runplan v-if="isCtc" ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
|
||||||
<notice-info v-if="isCtc" ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
<notice-info v-if="isCtc" ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||||
<cmdManage ref="cmdManage" />
|
<cmdManage v-if="isCtc" ref="cmdManage" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -28,17 +28,29 @@
|
|||||||
<el-table :data="cmdTableData" style="width: 100%" height="160" highlight-current-row @current-change="handleCurrentChange">
|
<el-table :data="cmdTableData" style="width: 100%" height="160" highlight-current-row @current-change="handleCurrentChange">
|
||||||
<el-table-column prop="title" label="标题" />
|
<el-table-column prop="title" label="标题" />
|
||||||
<el-table-column prop="number" label="号码" width="80" />
|
<el-table-column prop="number" label="号码" width="80" />
|
||||||
<el-table-column prop="typeName" label="命令类型" width="100">
|
<el-table-column label="命令类型" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
|
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="signStatus" label="收令日期" />
|
<el-table-column prop="sendTime" label="收令日期" width="160" />
|
||||||
<el-table-column prop="companyOfSender" label="发令单位" />
|
<el-table-column prop="companyOfSender" label="发令单位" />
|
||||||
<el-table-column prop="senderId" label="发令人" />
|
<el-table-column prop="senderName" label="发令人" />
|
||||||
<el-table-column prop="allSigned" label="签否" />
|
<el-table-column label="签否">
|
||||||
<el-table-column prop="signedBy" label="签收人" />
|
<template slot-scope="scope">
|
||||||
<el-table-column prop="signTime" label="签收时间" />
|
<span style="margin-left: 10px">{{ signedStatusObj[getSignInfo(scope.row.receiverInfos).signedStatus] || '' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="签收人">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">{{ getSignedBy(getSignInfo(scope.row.receiverInfos)) || '' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="签收时间" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">{{ getSignInfo(scope.row.receiverInfos).time || '' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -51,7 +63,7 @@
|
|||||||
<el-table :data="getTableData" style="width: 100%" height="190">
|
<el-table :data="getTableData" style="width: 100%" height="190">
|
||||||
<el-table-column type="index" label="序" width="50" />
|
<el-table-column type="index" label="序" width="50" />
|
||||||
<el-table-column prop="deviceName" label="受令单位" />
|
<el-table-column prop="deviceName" label="受令单位" />
|
||||||
<el-table-column prop="signedBy" label="抄知处所" />
|
<el-table-column prop="copyers" label="抄知处所" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="middle-right-middle">
|
<div class="middle-right-middle">
|
||||||
@ -71,8 +83,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom-btn">
|
<div class="bottom-btn">
|
||||||
<el-button :disabled="!commandId" @click="signCmd(false)">拒签</el-button>
|
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('REFUSE')">拒签</el-button>
|
||||||
<el-button :disabled="!commandId" @click="signCmd(true)">签收</el-button>
|
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('SIGNED')">签收</el-button>
|
||||||
<el-button @click="doClose">关闭</el-button>
|
<el-button @click="doClose">关闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -81,6 +93,7 @@
|
|||||||
import { sendCommandNew } from '@/api/jmap/training';
|
import { sendCommandNew } from '@/api/jmap/training';
|
||||||
import shouxinxiang from '@/assets/dispatcherStation/shouxinxiang.png';
|
import shouxinxiang from '@/assets/dispatcherStation/shouxinxiang.png';
|
||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
|
import { parseTime } from '@/utils/index';
|
||||||
export default {
|
export default {
|
||||||
name:'CmdManage',
|
name:'CmdManage',
|
||||||
data() {
|
data() {
|
||||||
@ -94,12 +107,17 @@ export default {
|
|||||||
currentInfo: {},
|
currentInfo: {},
|
||||||
typeObj: {
|
typeObj: {
|
||||||
NORMAL: '正常调度命令'
|
NORMAL: '正常调度命令'
|
||||||
|
},
|
||||||
|
signedStatusObj: {
|
||||||
|
UNSIGNED: '未签收',
|
||||||
|
SIGNED: '签收',
|
||||||
|
REFUSE: '拒签'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState('training', [
|
...mapState('training', [
|
||||||
'memberList', 'simulationUserList'
|
'memberList', 'simulationUserList', 'initTime'
|
||||||
]),
|
]),
|
||||||
...mapState('socket', [
|
...mapState('socket', [
|
||||||
'dispatchCommandMsg'
|
'dispatchCommandMsg'
|
||||||
@ -116,6 +134,23 @@ export default {
|
|||||||
commandId() {
|
commandId() {
|
||||||
return this.currentInfo.id || '';
|
return this.currentInfo.id || '';
|
||||||
},
|
},
|
||||||
|
currentHasSigned() {
|
||||||
|
let hasSigned = false;
|
||||||
|
if (this.currentInfo.receiverInfos) {
|
||||||
|
const obj = this.getSignInfo(this.currentInfo.receiverInfos);
|
||||||
|
if (obj && obj.signedStatus != 'UNSIGNED') {
|
||||||
|
hasSigned = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return hasSigned;
|
||||||
|
},
|
||||||
|
getActiveUser() {
|
||||||
|
const userInfo = this.simulationUserList.find(item => {
|
||||||
|
return item.userId == this.$store.state.user.id;
|
||||||
|
});
|
||||||
|
const activeUser = userInfo || {};
|
||||||
|
return activeUser;
|
||||||
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
const receiverList = Object.values(this.currentInfo.receiverInfos || {});
|
const receiverList = Object.values(this.currentInfo.receiverInfos || {});
|
||||||
const mList = [];
|
const mList = [];
|
||||||
@ -135,6 +170,7 @@ export default {
|
|||||||
mList.forEach(item => {
|
mList.forEach(item => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||||
const obj = {
|
const obj = {
|
||||||
|
...this.currentInfo,
|
||||||
...item,
|
...item,
|
||||||
deviceName: device ? device.name : ''
|
deviceName: device ? device.name : ''
|
||||||
};
|
};
|
||||||
@ -144,9 +180,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dispatchCommandMsg(val) {
|
dispatchCommandMsg(Obj) {
|
||||||
if (val.type == 'ADD') {
|
if (Obj.type == 'ADD') {
|
||||||
this.cmdTableData.push(val.body);
|
const list = Obj.body;
|
||||||
|
this.cmdTableData.push(list);
|
||||||
|
this.show && this.$store.commit('socket/clearDispatchCommandMsg');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -165,20 +203,48 @@ export default {
|
|||||||
handleCurrentChange(obj) {
|
handleCurrentChange(obj) {
|
||||||
this.currentInfo = obj;
|
this.currentInfo = obj;
|
||||||
},
|
},
|
||||||
|
getSignInfo(info) {
|
||||||
|
const obj = info[this.getActiveUser.memberId] || {};
|
||||||
|
return obj;
|
||||||
|
},
|
||||||
|
getSignedBy(info) {
|
||||||
|
const signedInfo = this.simulationUserList.find(item => {
|
||||||
|
return item.memberId == info.signedBy;
|
||||||
|
});
|
||||||
|
let name = '';
|
||||||
|
if (signedInfo) {
|
||||||
|
name = signedInfo.nickName;
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
},
|
||||||
signCmd(status) {
|
signCmd(status) {
|
||||||
if (!this.commandId) { return; }
|
if (!this.commandId) { return; }
|
||||||
const activeUser = this.$store.state.user.id;
|
|
||||||
const data = {
|
const data = {
|
||||||
signInfo: {
|
signInfo: {
|
||||||
commandId: this.commandId,
|
commandId: this.commandId,
|
||||||
signedBy: activeUser,
|
signedBy: this.getActiveUser.memberId,
|
||||||
signedStatus: status ? 'SIGNED' : 'UNSIGNED'
|
signedStatus: status
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
|
sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
|
||||||
console.log(res, '---res');
|
console.log(res, '---res');
|
||||||
|
if (res.code == 200) {
|
||||||
|
const index = this.cmdTableData.findIndex(item => {
|
||||||
|
return item.id == this.commandId;
|
||||||
|
});
|
||||||
|
if (index >= 0) {
|
||||||
|
const obj = this.cmdTableData[index];
|
||||||
|
const mId = this.getActiveUser.memberId;
|
||||||
|
obj.receiverInfos[mId].signedBy = mId;
|
||||||
|
obj.receiverInfos[mId].signedStatus = status;
|
||||||
|
obj.receiverInfos[mId].time = parseTime(this.initTime);
|
||||||
|
this.cmdTableData.splice(index, 1, obj);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$messageBox(`${this.signedStatusObj[status]}调度命令失败:${res.message}`);
|
||||||
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('查询调度命令失败:' + error.message);
|
this.$messageBox(`${this.signedStatusObj[status]}调度命令失败:${error.message}`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
searchCmd() {
|
searchCmd() {
|
||||||
|
@ -53,12 +53,12 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="发令人">
|
<el-form-item label="发令人">
|
||||||
<el-select v-model="command.senderId" disabled placeholder="请选择" style="width: 100%;" @change="senderChange">
|
<el-select v-model="command.senderName" disabled placeholder="请选择" style="width: 100%;" @change="senderChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in simulationUserList"
|
v-for="item in memberDataList"
|
||||||
:key="item.memberId"
|
:key="item.id"
|
||||||
:label="item.nickName"
|
:label="item.labelName"
|
||||||
:value="item.memberId"
|
:value="item.labelName"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -141,8 +141,12 @@
|
|||||||
<el-table-column type="selection" width="50" />
|
<el-table-column type="selection" width="50" />
|
||||||
<el-table-column prop="deviceName" label="受令单位" width="180" />
|
<el-table-column prop="deviceName" label="受令单位" width="180" />
|
||||||
<el-table-column prop="copyers" label="抄送" width="180" />
|
<el-table-column prop="copyers" label="抄送" width="180" />
|
||||||
<el-table-column prop="signStatus" label="签收状态" />
|
<el-table-column label="签收状态">
|
||||||
<el-table-column prop="signedBy" label="签收人" />
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.nickName ? signedStatusObj[scope.row.signedStatus] : '' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="nickName" label="签收人" />
|
||||||
<el-table-column prop="signTime" label="签收时间" />
|
<el-table-column prop="signTime" label="签收时间" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
@ -176,11 +180,17 @@ export default {
|
|||||||
typeOptions: [
|
typeOptions: [
|
||||||
{label: '正常调度命令', value: 'NORMAL'}
|
{label: '正常调度命令', value: 'NORMAL'}
|
||||||
],
|
],
|
||||||
|
signedStatusObj: {
|
||||||
|
UNSIGNED: '未签收',
|
||||||
|
SIGNED: '签收',
|
||||||
|
REFUSE: '拒签'
|
||||||
|
},
|
||||||
command: {
|
command: {
|
||||||
title: '',
|
title: '',
|
||||||
number: '',
|
number: '',
|
||||||
sendTime: '',
|
sendTime: '',
|
||||||
senderId: '',
|
senderId: '',
|
||||||
|
senderName: '',
|
||||||
companyOfSender: '',
|
companyOfSender: '',
|
||||||
authorizationTime: '',
|
authorizationTime: '',
|
||||||
authorizationStatus: '',
|
authorizationStatus: '',
|
||||||
@ -193,12 +203,13 @@ export default {
|
|||||||
allSigned: ''
|
allSigned: ''
|
||||||
},
|
},
|
||||||
cmdTextarea: '',
|
cmdTextarea: '',
|
||||||
tableChecked: false
|
tableChecked: false,
|
||||||
|
memberDataList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState('training', [
|
...mapState('training', [
|
||||||
'memberList', 'simulationUserList'
|
'memberList', 'memberData', 'simulationUserList'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow;
|
return this.dialogShow;
|
||||||
@ -230,8 +241,7 @@ export default {
|
|||||||
deviceName: device ? device.name : '',
|
deviceName: device ? device.name : '',
|
||||||
nickName: useInfo ? useInfo.nickName : '',
|
nickName: useInfo ? useInfo.nickName : '',
|
||||||
copyers: '',
|
copyers: '',
|
||||||
signStatus: false,
|
signedStatus: 'UNSIGNED',
|
||||||
signer: '',
|
|
||||||
signTime: ''
|
signTime: ''
|
||||||
};
|
};
|
||||||
list.push(obj);
|
list.push(obj);
|
||||||
@ -239,27 +249,17 @@ export default {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {},
|
||||||
simulationUserList(list) {
|
|
||||||
const activeUser = list.find(item => {
|
|
||||||
return item.userId == this.$store.state.user.id;
|
|
||||||
});
|
|
||||||
if (activeUser) {
|
|
||||||
this.command.senderId = activeUser.memberId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
beforeDestroy() {},
|
beforeDestroy() {},
|
||||||
mounted() {
|
mounted() {},
|
||||||
this.searchCmd();
|
|
||||||
},
|
|
||||||
methods:{
|
methods:{
|
||||||
initData() {
|
initData() {
|
||||||
this.command = {
|
this.command = {
|
||||||
title: '',
|
title: '',
|
||||||
number: '',
|
number: '',
|
||||||
sendTime: '',
|
sendTime: '',
|
||||||
senderId: this.command.senderId,
|
senderId: '',
|
||||||
|
senderName: this.command.senderName,
|
||||||
companyOfSender: '',
|
companyOfSender: '',
|
||||||
authorizationTime: '',
|
authorizationTime: '',
|
||||||
authorizationStatus: '',
|
authorizationStatus: '',
|
||||||
@ -283,7 +283,18 @@ export default {
|
|||||||
this.command.companyOfSender = device ? device.name : '';
|
this.command.companyOfSender = device ? device.name : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getSenderName() {
|
||||||
|
const activeUser = this.memberDataList.find(item => {
|
||||||
|
return item.userId == this.$store.state.user.id;
|
||||||
|
});
|
||||||
|
if (activeUser) {
|
||||||
|
// this.command.senderId = activeUser.id;
|
||||||
|
this.command.senderName = activeUser.labelName;
|
||||||
|
}
|
||||||
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
|
this.memberDataList = Object.values(this.memberData);
|
||||||
|
this.getSenderName();
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
@ -307,7 +318,7 @@ export default {
|
|||||||
};
|
};
|
||||||
sendCommandNew(this.group, 'CTC_SEND_DISPATCH_COMMAND', data).then((res) => {
|
sendCommandNew(this.group, 'CTC_SEND_DISPATCH_COMMAND', data).then((res) => {
|
||||||
console.log(res, '---res');
|
console.log(res, '---res');
|
||||||
this.$messageBox('发送调度命令成功!');
|
this.$message.success('发送调度命令成功!');
|
||||||
this.initData();
|
this.initData();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('发送调度命令失败:' + error.message);
|
this.$messageBox('发送调度命令失败:' + error.message);
|
||||||
@ -315,9 +326,9 @@ export default {
|
|||||||
},
|
},
|
||||||
searchCmd() {
|
searchCmd() {
|
||||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
|
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
|
||||||
console.log(res, '---res');
|
console.log(res, '---res----');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('查询调度命令失败:' + error.$message);
|
this.$messageBox('查询调度命令失败:' + error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user