需求清单

This commit is contained in:
liaoboping 2025-09-21 12:47:28 +08:00
parent d89c6d9385
commit b19300f65e
2 changed files with 107 additions and 17 deletions

View File

@ -55,19 +55,19 @@
</a-tree> </a-tree>
</div> </div>
</ModuleWrapper> </ModuleWrapper>
<ModuleWrapper height="55%"> <ModuleWrapper height="55%" title="保障需求清单">
<template #title> <!-- <template #title>
<a-radio-group v-model="qd.qdlx" button-style="solid"> <a-radio-group v-model="qd.qdlx" button-style="solid">
<a-radio-button value="xqqd">需求清单</a-radio-button> <a-radio-button value="xqqd">需求清单</a-radio-button>
<a-radio-button value="bzqd">保障清单</a-radio-button> <a-radio-button value="bzqd">保障清单</a-radio-button>
</a-radio-group> </a-radio-group>
</template> </template> -->
<div class="normal" style="padding: 5px"> <div class="normal" style="padding: 5px; overflow-y: auto">
<a-table <a-table
class="simulation-table-plain" class="simulation-table-plain"
rowKey="id" rowKey="id"
:columns="qd.qdColumns" :columns="qd.qdColumns"
:dataSource="qd.qdList" :dataSource="supplierRequests"
:pagination="false" :pagination="false"
:bordered="true" :bordered="true"
></a-table> ></a-table>
@ -172,15 +172,18 @@ export default {
qd: { qd: {
qdlx: 'xqqd', qdlx: 'xqqd',
qdColumns: [ qdColumns: [
{ // {
dataIndex: 'dj', // dataIndex: 'dj',
title: '等级', // title: '',
width: '62px', // width: '62px',
align: 'center', // align: 'center',
customRender: (text) => ['', '紧急', '加急', '一般'][text], // customRender: (text) => ['', '', '', ''][text],
customCell: (record) => ({ style: { color: ['', '#ff3838', '#feba29', '#ffffff'][record.dj] } }), // customCell: (record) => ({ style: { color: ['', '#ff3838', '#feba29', '#ffffff'][record.dj] } }),
}, // },
{ dataIndex: 'bzxq', title: '保障需求' }, // { dataIndex: 'bzxq', title: '' },
{ title: '等级', dataIndex: 'handleFlag' },
{ title: '保障需求', dataIndex: 'supplierType' },
{ title: '保障数量', dataIndex: 'supplierNum' },
], ],
qdList: [ qdList: [
{ id: '1', dj: '1', bzxq: '500枚防空导弹、6辆装甲车' }, { id: '1', dj: '1', bzxq: '500枚防空导弹、6辆装甲车' },
@ -229,6 +232,20 @@ export default {
} }
return this.roomInfo.roomData.find((item) => item.sdzy.id === this.zzbzll.selectedKeys[0]) return this.roomInfo.roomData.find((item) => item.sdzy.id === this.zzbzll.selectedKeys[0])
}, },
supplierRequests() {
return (this.zzbzllSelectedFd?.supplierRequests || []).map((item) => ({
id: item.id,
handleFlag: ['未处理', '已处理'][item.handleFlag],
supplierType:
{
fuel: '油料',
injured: '伤员',
ammunition: '弹药',
death: '死亡',
}[item.supplierType] || item.supplierType,
supplierNum: item.supplierNum,
}))
},
rightRows() { rightRows() {
switch (this.rightViewer) { switch (this.rightViewer) {
case 'blbz': case 'blbz':

View File

@ -42,7 +42,7 @@
style="grid-area: 2 / 1 / 3 / 4" style="grid-area: 2 / 1 / 3 / 4"
></div> ></div>
<div class="pr zi1" style="grid-area: 2 / 1 / 3 / 2"> <div class="pr zi1" style="grid-area: 2 / 1 / 3 / 2">
<ModuleWrapper title="作战/保障力量" height="60%"> <ModuleWrapper title="作战/保障力量" height="45%">
<div class="normal" style="padding: 5px; overflow-y: auto"> <div class="normal" style="padding: 5px; overflow-y: auto">
<a-tree <a-tree
class="simulation-tree" class="simulation-tree"
@ -54,9 +54,21 @@
</a-tree> </a-tree>
</div> </div>
</ModuleWrapper> </ModuleWrapper>
<ModuleWrapper title="日志" height="40%"> <ModuleWrapper height="55%" title="保障需求清单">
<div class="normal"></div> <div class="normal" style="padding: 5px; overflow-y: auto">
<a-table
class="simulation-table-plain"
rowKey="id"
:columns="qd.qdColumns"
:dataSource="supplierRequests"
:pagination="false"
:bordered="true"
></a-table>
</div>
</ModuleWrapper> </ModuleWrapper>
<!-- <ModuleWrapper title="日志" height="40%">
<div class="normal"></div>
</ModuleWrapper> -->
</div> </div>
<Grid class="pr zi1" :rows="rightRows" gap="0px" style="grid-area: 2 / 3 / 3 / 4"> <Grid class="pr zi1" :rows="rightRows" gap="0px" style="grid-area: 2 / 3 / 3 / 4">
<ModuleWrapper title="兵力编组"> <ModuleWrapper title="兵力编组">
@ -153,6 +165,13 @@ export default {
zzbzll: { zzbzll: {
selectedKeys: [], selectedKeys: [],
}, },
qd: {
qdColumns: [
{ title: '等级', dataIndex: 'handleFlag' },
{ title: '保障需求', dataIndex: 'supplierType' },
{ title: '保障数量', dataIndex: 'supplierNum' },
],
},
blbz: { blbz: {
treeData: [], treeData: [],
}, },
@ -193,6 +212,20 @@ export default {
} }
return this.roomInfo.roomData.find((item) => item.sdzy.id === this.zzbzll.selectedKeys[0]) return this.roomInfo.roomData.find((item) => item.sdzy.id === this.zzbzll.selectedKeys[0])
}, },
supplierRequests() {
return (this.zzbzllSelectedFd?.supplierRequests || []).map(item => ({
id: item.id,
handleFlag: ['未处理', '已处理'][item.handleFlag],
supplierType:
{
fuel: '油料',
injured: '伤员',
ammunition: '弹药',
death: '死亡',
}[item.supplierType] || item.supplierType,
supplierNum: item.supplierNum,
}))
},
rightRows() { rightRows() {
switch (this.rightViewer) { switch (this.rightViewer) {
case 'blbz': case 'blbz':
@ -315,6 +348,7 @@ export default {
case 'editScenarioInfo': case 'editScenarioInfo':
if (this.initial === false) { if (this.initial === false) {
this.roomInfo.roomData = JSON.parse(response.data) this.roomInfo.roomData = JSON.parse(response.data)
console.log(this.roomInfo.roomData)
this.initPlots() this.initPlots()
this.initial = true this.initial = true
} }
@ -439,4 +473,43 @@ export default {
background-color: #bae7ff22; background-color: #bae7ff22;
} }
} }
.simulation-table-plain::v-deep {
.ant-table {
color: #a1c2d0;
}
.ant-table-body > table {
border: none;
}
.ant-table-thead > tr > th {
background-color: #083a52;
color: #ffffff;
border-bottom-color: #05628e;
border-top: 1px solid #05628e;
&:last-child {
border-right-color: #05628e;
}
&:not(:last-child) {
border-right-color: #05628e3b;
}
&:first-child {
border-left: 1px solid #05628e;
}
&:not(:first-child) {
}
}
.ant-table-tbody > tr > td {
border-bottom-color: #064766;
&:last-child {
border-right-color: #064766;
}
&:not(:last-child) {
border-right-color: #05628e3b;
}
&:first-child {
border-left: 1px solid #064766;
}
&:not(:first-child) {
}
}
}
</style> </style>