调度命令调整
This commit is contained in:
parent
95c739c342
commit
f8c51df3c9
@ -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">
|
||||||
@ -94,12 +106,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 +133,13 @@ export default {
|
|||||||
commandId() {
|
commandId() {
|
||||||
return this.currentInfo.id || '';
|
return this.currentInfo.id || '';
|
||||||
},
|
},
|
||||||
|
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 +159,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 +169,10 @@ 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -165,13 +191,26 @@ 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' : 'REFUSE'
|
signedStatus: status ? 'SIGNED' : 'REFUSE'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -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,6 +180,11 @@ export default {
|
|||||||
typeOptions: [
|
typeOptions: [
|
||||||
{label: '正常调度命令', value: 'NORMAL'}
|
{label: '正常调度命令', value: 'NORMAL'}
|
||||||
],
|
],
|
||||||
|
signedStatusObj: {
|
||||||
|
UNSIGNED: '未签收',
|
||||||
|
SIGNED: '签收',
|
||||||
|
REFUSE: '拒签'
|
||||||
|
},
|
||||||
command: {
|
command: {
|
||||||
title: '',
|
title: '',
|
||||||
number: '',
|
number: '',
|
||||||
@ -232,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);
|
||||||
|
Loading…
Reference in New Issue
Block a user