提交任务和物资管理

This commit is contained in:
wangchengming 2025-09-14 15:21:00 +08:00
parent 77615cddef
commit 84fd9770a8
3 changed files with 437 additions and 192 deletions

View File

@ -1,39 +1,20 @@
<template>
<page-header-wrapper>
<Grid :columns="['400px', 1]" :rows="gridRows">
<a-card title="组织架构-作战力量" class="my-card my-card-has-title" :bordered="false" style="grid-row: 1 / 3">
<a-card title="组织架构-作战力量" class="my-card my-card-has-title" :bordered="false" style="grid-row: 1 / 4">
<template #extra>
<a-button type="primary" icon="plus" shape="circle" title="新增" @click="handleOpenAddZzjgModal()"></a-button>
</template>
<a-tree
:treeData="zzjg.treeData"
:selectedKeys.sync="zzjg.selectedKeys"
:expandedKeys.sync="zzjg.expandedKeys"
@select="handleChangeZzjgSelected"
>
<a-tree :treeData="zzjg.treeData" :selectedKeys.sync="zzjg.selectedKeys" :expandedKeys.sync="zzjg.expandedKeys"
@select="handleChangeZzjgSelected">
<template #title="{ key: id, title }">
<a-dropdown :trigger="['contextmenu']">
<span>{{ title }}</span>
<template #overlay>
<Flex class="contextmenu-zz">
<a-button
type="text-primary"
icon="edit"
title="编辑"
@click="handleOpenEditZzjgModal(id)"
></a-button>
<a-button
type="text-primary"
icon="plus"
title="新增子项"
@click="handleOpenAddZzjgModal(id)"
></a-button>
<a-button
type="text-danger"
icon="delete"
title="删除"
@click="handleDeleteZzjg(id, title)"
></a-button>
<a-button type="text-primary" icon="edit" title="编辑" @click="handleOpenEditZzjgModal(id)"></a-button>
<a-button type="text-primary" icon="plus" title="新增子项" @click="handleOpenAddZzjgModal(id)"></a-button>
<a-button type="text-danger" icon="delete" title="删除" @click="handleDeleteZzjg(id, title)"></a-button>
</Flex>
</template>
</a-dropdown>
@ -43,22 +24,12 @@
<a-card title="组织人员" class="my-card my-card-has-title" :bordered="false">
<template #extra>
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzryModal">新增</a-button>
<a-icon
v-if="layoutRight === 'zzry'"
type="fullscreen-exit"
style="font-size: 32px"
@click="layoutRight = 'auto'"
/>
<a-icon v-if="layoutRight === 'zzry'" type="fullscreen-exit" style="font-size: 32px"
@click="layoutRight = 'auto'" />
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzry'" />
</template>
<AntQueryTable
ref="zzry-table"
height="100%"
:queryConfig="zzry.queryConfig"
:tableConfig="zzry.tableConfig"
:pageConfig="zzry.pageConfig"
:showTool="zzry.showTool"
>
<AntQueryTable ref="zzry-table" height="100%" :queryConfig="zzry.queryConfig" :tableConfig="zzry.tableConfig"
:pageConfig="zzry.pageConfig" :showTool="zzry.showTool">
<template #tablecell-action="{ record }">
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzryModal(record)"></a-button>
</template>
@ -67,55 +38,46 @@
<a-card title="组织装备" class="my-card my-card-has-title" :bordered="false">
<template #extra>
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzzbModal">新增</a-button>
<a-icon
v-if="layoutRight === 'zzzb'"
type="fullscreen-exit"
style="font-size: 32px"
@click="layoutRight = 'auto'"
/>
<a-icon v-if="layoutRight === 'zzzb'" type="fullscreen-exit" style="font-size: 32px"
@click="layoutRight = 'auto'" />
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzzb'" />
</template>
<AntQueryTable
ref="zzzb-table"
height="100%"
:queryConfig="zzzb.queryConfig"
:tableConfig="zzzb.tableConfig"
:pageConfig="zzzb.pageConfig"
:showTool="zzzb.showTool"
>
<AntQueryTable ref="zzzb-table" height="100%" :queryConfig="zzzb.queryConfig" :tableConfig="zzzb.tableConfig"
:pageConfig="zzzb.pageConfig" :showTool="zzzb.showTool">
<template #tablecell-action="{ record }">
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzzbModal(record)"></a-button>
</template>
</AntQueryTable>
</a-card>
<!-- 组织物资卡片 -->
<a-card title="组织物资" class="my-card my-card-has-title" :bordered="false">
<template #extra>
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzwzModal">新增</a-button>
<a-icon v-if="layoutRight === 'zzwz'" type="fullscreen-exit" style="font-size: 32px"
@click="layoutRight = 'auto'" />
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzwz'" />
</template>
<AntQueryTable ref="zzwz-table" height="100%" :queryConfig="zzwz.queryConfig" :tableConfig="zzwz.tableConfig"
:pageConfig="zzwz.pageConfig" :showTool="zzwz.showTool">
<template #tablecell-action="{ record }">
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzwzModal(record)"></a-button>
</template>
</AntQueryTable>
</a-card>
</Grid>
<AntFormModal
:visible.sync="zzjgModal.visible"
:title="zzjgModal.title"
:formItems="zzjgModal.formItems"
:formRules="zzjgModal.formRules"
:formData="zzjgModal.formData"
:onSubmit="handleSubmitZzjg"
@success="handleSubmitZzjgSuccess"
></AntFormModal>
<AntFormModal
:visible.sync="zzryModal.visible"
:title="zzryModal.title"
:formItems="zzryModal.formItems"
:formRules="zzryModal.formRules"
:formData="zzryModal.formData"
:onSubmit="handleSubmitZzry"
@success="handleSubmitZzrySuccess"
></AntFormModal>
<AntFormModal
:visible.sync="zzzbModal.visible"
:title="zzzbModal.title"
:formItems="zzzbFormItems"
:formRules="zzzbModal.formRules"
:formData="zzzbModal.formData"
:onSubmit="handleSubmitZzzb"
@success="handleSubmitZzzbSuccess"
></AntFormModal>
<AntFormModal :visible.sync="zzjgModal.visible" :title="zzjgModal.title" :formItems="zzjgModal.formItems"
:formRules="zzjgModal.formRules" :formData="zzjgModal.formData" :onSubmit="handleSubmitZzjg"
@success="handleSubmitZzjgSuccess"></AntFormModal>
<AntFormModal :visible.sync="zzryModal.visible" :title="zzryModal.title" :formItems="zzryModal.formItems"
:formRules="zzryModal.formRules" :formData="zzryModal.formData" :onSubmit="handleSubmitZzry"
@success="handleSubmitZzrySuccess"></AntFormModal>
<AntFormModal :visible.sync="zzzbModal.visible" :title="zzzbModal.title" :formItems="zzzbFormItems"
:formRules="zzzbModal.formRules" :formData="zzzbModal.formData" :onSubmit="handleSubmitZzzb"
@success="handleSubmitZzzbSuccess"></AntFormModal>
<!-- 组织物资模态框 -->
<AntFormModal :visible.sync="zzwzModal.visible" :title="zzwzModal.title" :formItems="zzwzFormItems"
:formRules="zzwzModal.formRules" :formData="zzwzModal.formData" :onSubmit="handleSubmitZzwz"
@success="handleSubmitZzwzSuccess"></AntFormModal>
</page-header-wrapper>
</template>
@ -259,36 +221,105 @@ export default {
},
formData: {},
},
zzwz: {
queryConfig: false,
tableConfig: {
table: {},
immediate: false,
query: () =>
this.$http({
url: `baseData/fightPowerHierarchy/supplier/getByOrgId?id=${this.zzjg.selectedKeys[0]}`, // material
method: 'get',
}),
columns: [
{ dataIndex: 'serial' },
{ title: '物资名称', dataIndex: 'name', width: 'auto', minWidth: 150 }, //
{ title: '物资数量', dataIndex: 'account', type: 'account', width: 'auto', minWidth: 150 }, //
{ dataIndex: 'action' },
],
},
pageConfig: false,
showTool: false,
},
zzwzModal: {
visible: false,
title: '',
mode: '',
formItems: [
{
label: '物资名称', //
prop: 'supplierId', //
component: 'AntOriginTreeSelect',
options: {
dataSource: () =>
this.$http({
url: '/suppliesDict/tree',
method: 'get',
}),
readonly: false,
},
},
{ label: '物资数量', prop: 'total' }, //
],
formRules: {
supplierId: [{ required: true, message: '请选择物资!', trigger: 'change' }], //
total: [{ required: true, message: '请输入物资数量!', trigger: 'blur' }], //
},
formData: {},
},
}
},
computed: {
gridRows() {
return {
auto: [1, 1],
zzry: [1, '56px'],
zzzb: ['56px', 1],
auto: [1, 1, 1],
zzry: [1, '56px', '56px'],
zzzb: ['56px', 1, '56px'],
zzwz: ['56px', '56px', 1],
}[this.layoutRight]
},
zzzbFormItems() {
return [
this.zzzbModal.mode === 'add'
? {
label: '装备名称',
prop: 'weaponId',
component: 'AntOriginTreeSelect',
options: {
dataSource: () =>
this.$http({
url: '/tree/armament',
method: 'get',
}),
readonly: false,
},
}
label: '装备名称',
prop: 'weaponId',
component: 'AntOriginTreeSelect',
options: {
dataSource: () =>
this.$http({
url: '/tree/armament',
method: 'get',
}),
readonly: false,
},
}
: { label: '装备名称', prop: 'name', customRender: (v) => v },
{ label: '装备数量', prop: 'number' },
]
},
zzwzFormItems() {
return [
this.zzwzModal.mode === 'add'
? {
label: '物资名称',
prop: 'supplierId',
component: 'AntOriginTreeSelect',
options: {
dataSource: () =>
this.$http({
url: '/suppliesDict/tree',
method: 'get',
}),
valueKey: 'key',
readonly: false,
},
}
: { label: '物资名称', prop: 'name', customRender: (v) => v },
{ label: '物资数量', prop: 'account' },
]
},
},
created() {
this.getZzTree()
@ -311,6 +342,7 @@ export default {
handleChangeZzjgSelected() {
this.$refs['zzry-table'].commitAction('reload')
this.$refs['zzzb-table'].commitAction('reload')
this.$refs['zzwz-table'].commitAction('reload')
},
handleOpenAddZzjgModal(parentId) {
this.zzjgModal.title = '新建作战力量'
@ -352,7 +384,7 @@ export default {
})
this.$message.success('删除成功')
this.getZzTree()
} catch (error) {}
} catch (error) { }
},
handleOpenAddZzryModal() {
@ -402,6 +434,30 @@ export default {
handleSubmitZzzbSuccess() {
this.$refs['zzzb-table'].commitAction('query')
},
handleOpenAddZzwzModal() {
this.zzwzModal.title = '新建组织物资' //
this.zzwzModal.mode = 'add'
this.zzwzModal.formData = { orgId: this.zzjg.selectedKeys[0] }
this.zzwzModal.visible = true
},
handleOpenEditZzwzModal(record) {
this.zzwzModal.title = `编辑组织物资` //
this.zzwzModal.mode = 'edit'
this.zzwzModal.formData = { ...record }
this.zzwzModal.visible = true
},
handleSubmitZzwz(formData) {
return this.$http({
url: `/baseData/fightPowerHierarchy/supplier/save`, // material
method: 'post',
data: formData,
})
},
handleSubmitZzwzSuccess() {
this.$refs['zzwz-table'].commitAction('query')
},
},
}
</script>

View File

@ -0,0 +1,228 @@
<template>
<Flex fd="co" class="zzxd-wrapper">
<Flex class="zzxd-header" ai="c" jc="sb">
<div class="zzxd-title">保障任务</div>
<div>
<a-button type="text-primary" icon="menu"></a-button>
<a-button type="text-primary" icon="plus" @click="handleOpenAddActionModal"></a-button>
<a-button type="text-primary" icon="edit" @click="handleOpenEditActionModal"></a-button>
<a-button type="text-primary" icon="delete" @click="handleDeleteAction"></a-button>
</div>
<a-modal v-model="actionModal.visible" :title="actionModal.title" :maskClosable="false" :destroyOnClose="true"
@ok="handleSubmilAction">
<a-form-model :model="actionModal.formData" layout="horizontal" :labelCol="{ span: 6 }"
:wrapperCol="{ span: 15 }">
<a-form-model-item v-for="item in actionModal.formItems" :key="item.prop" v-bind="item">
<component :is="item.component || 'a-input'" v-model="actionModal.formData[item.prop]"
v-bind="item.options" />
</a-form-model-item>
</a-form-model>
</a-modal>
</Flex>
<div class="flex-1 scroller-y">
<div v-for="item in actionList" :key="item.id" class="action-item flex" @click="checkedAction = item">
<div class="action-icon">
<div class="action-line"></div>
<a-radio :checked="checkedAction && checkedAction.id === item.id" style="margin-right: 0"></a-radio>
</div>
<div class="flex-1">
<div class="action-title">{{ item.name || '- -' }}</div>
<div class="action-time">任务类型{{ handleGetTaskType(item.taskType) }}</div>
<div class="action-time">开始时间{{ item.startTime }}</div>
<div class="action-time">结束时间{{ item.endTime }}</div>
</div>
</div>
</div>
</Flex>
</template>
<script>
export default {
props: {
scenarioId: { type: String, required: true },
resourceid: { type: String, required: true },
type: { type: Number, required: true },
},
data() {
return {
checkedAction: null,
actionModal: {
visible: false,
formItems: [
{ label: '任务名称', prop: 'name' },
{
label: '任务类型',
prop: 'taskType',
component: 'AntOriginSelect',
options: {
dataSource: () => ({
data: [
{ id: '1', title: '机动任务' },
{ id: '2', title: '战斗任务' },
{ id: '3', title: '整备任务' },
{ id: '4', title: '弹药保障' },
{ id: '5', title: '水保障' },
{ id: '6', title: '油保障' },
{ id: '7', title: '食品保障' }
],
}),
},
},
{
label: '开始时间', prop: 'startTime', component: 'a-date-picker', options: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '结束时间', prop: 'endTime', component: 'a-date-picker', options: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{ label: '开始经度', prop: 'fromLng' },
{ label: '开始纬度', prop: 'fromLat' },
{ label: '目标经度', prop: 'toLng' },
{ label: '目标纬度', prop: 'toLat' },
],
formData: {},
},
actionList: []
}
},
created() {
if (this.scenarioId && this.resourceid) {
this.handleGetTaskList()
}
},
watch: {
resourceid: {
handler(newValue, oldValue) {
console.log('用户信息发生了变化:', newValue);
this.handleGetTaskList()
},
deep: true //
}
},
methods: {
handleGetTaskType(type) {
switch (type) {
case '1':
return '机动任务'
case '2':
return '战斗任务'
case '3':
return '整备任务'
case '4':
return '弹药保障'
case '5':
return '水保障'
case '6':
return '油保障'
case '7':
return '食品保障'
default:
return '- -'
}
},
handleGetTaskList() {
this.$http({
url: '/scenarioTask/taskList',
method: 'post',
data: { scenarioId: parseInt(this.scenarioId), resourceId: this.resourceid },
}).then(res => {
this.actionList = res.data
})
},
handleOpenAddActionModal() {
this.actionModal.title = '添加任务'
this.actionModal.formData = {
type: this.type,
scenarioId: parseInt(this.scenarioId),
resourceId: this.resourceid
}
this.actionModal.visible = true
},
handleOpenEditActionModal() {
this.actionModal.title = '修改任务'
this.actionModal.formData = { ...this.checkedAction }
this.actionModal.visible = true
},
async handleSubmilAction() {
try {
await this.$http({
url: '/scenarioTask/save',
method: 'post',
data: this.actionModal.formData,
})
this.$message.success(`${this.actionModal.title}成功`)
this.actionModal.visible = false
this.handleGetTaskList()
} catch (error) {
console.log(error)
}
},
async handleDeleteAction() {
try {
await this.$confirm('确认删除所选任务吗?')
await this.$http({
url: '/scenarioTask/remove/' + this.checkedAction.id,
method: 'get'
})
this.$message.success(`删除任务成功`)
this.handleGetTaskList()
} catch (error) {
this.$message.success(`删除任务失败`)
console.log(error)
}
},
},
}
</script>
<style lang="less" scoped>
.zzxd-wrapper {
height: 100%;
.zzxd-header {
padding: 5px 0;
border-bottom: 1px solid #00baff22;
.zzxd-title {
color: #00baff;
}
}
}
.action-item {
cursor: pointer;
padding: 5px 0;
.action-icon {
padding: 5px 16px;
position: relative;
flex-shrink: 0;
.action-line {
position: absolute;
right: 50%;
top: 21px;
width: 1px;
height: 100%;
background-color: #00baff;
}
}
}
.action-item:last-of-type {
.action-line {
display: none;
}
}
.action-item:hover {
background-color: #bae7ff44;
}
</style>

View File

@ -7,39 +7,21 @@
<a-button type="text-primary" icon="sync" style="font-size: 20px" @click="getZzbzllTreeData()"></a-button>
</template>
<div class="normal" style="padding: 5px; overflow-y: auto">
<a-tree
class="simulation-tree"
:treeData="zzbzll.treeData"
:selectedKeys.sync="zzbzll.selectedKeys"
:replaceFields="{ children: 'children', title: 'title', key: 'id' }"
@select="handleSelectZzbzll"
>
<a-tree class="simulation-tree" :treeData="zzbzll.treeData" :selectedKeys.sync="zzbzll.selectedKeys"
:replaceFields="{ children: 'children', title: 'title', key: 'id' }" @select="handleSelectZzbzll">
<template #title="{ id, dataRef }">
<a-dropdown :trigger="['contextmenu']">
<span>{{ dataRef.resourceName || dataRef.title }}</span>
<template #overlay>
<Flex>
<a-button
type="text-primary"
icon="edit"
title="修改名称"
@click="handleOpenEditZzbzllModal(id, dataRef)"
></a-button>
<AntFormModal
:visible.sync="zzbzllModal.visible"
:title="zzbzllModal.title"
:formItems="zzbzllModal.formItems"
:formRules="zzbzllModal.formRules"
:formData="zzbzllModal.formData"
:onSubmit="handleSubmitZzbzll"
@success="handleSubmitZzbzllSuccess"
></AntFormModal>
<a-button
type="text-danger"
icon="delete"
title="删除"
@click="handleDeleteZzbzll(id, dataRef)"
></a-button>
<a-button type="text-primary" icon="edit" title="修改名称"
@click="handleOpenEditZzbzllModal(id, dataRef)"></a-button>
<AntFormModal :visible.sync="zzbzllModal.visible" :title="zzbzllModal.title"
:formItems="zzbzllModal.formItems" :formRules="zzbzllModal.formRules"
:formData="zzbzllModal.formData" :onSubmit="handleSubmitZzbzll"
@success="handleSubmitZzbzllSuccess"></AntFormModal>
<a-button type="text-danger" icon="delete" title="删除"
@click="handleDeleteZzbzll(id, dataRef)"></a-button>
</Flex>
</template>
</a-dropdown>
@ -56,25 +38,12 @@
</template>
<Flex class="normal" fd="co" style="padding: 5px">
<template v-if="model.type === 'zbys'">
<a-input-search
v-model="model.queryParams.keyword"
placeholder="输入关键词搜索..."
@search="getZbysListData()"
/>
<a-input-search v-model="model.queryParams.keyword" placeholder="输入关键词搜索..." @search="getZbysListData()" />
<Flex>
<AntOriginSelect
v-model="model.queryParams.force"
:dataSource="() => ({ data: model.forceOptions })"
width="100px"
:allowClear="false"
/>
<AntOriginSelect
v-model="model.queryParams.type"
:dataSource="() => ({ data: model.typeOptions })"
class="flex-1"
:allowClear="false"
@change="getZbysListData()"
/>
<AntOriginSelect v-model="model.queryParams.force" :dataSource="() => ({ data: model.forceOptions })"
width="100px" :allowClear="false" />
<AntOriginSelect v-model="model.queryParams.type" :dataSource="() => ({ data: model.typeOptions })"
class="flex-1" :allowClear="false" @change="getZbysListData()" />
</Flex>
<Flex class="flex-1 scroller-y" fw="w" ac="fs">
<Flex v-for="item in model.listData" :key="item.id" class="model-item" fd="co" ai="c">
@ -86,68 +55,41 @@
</Flex>
</ModuleWrapper>
</div>
<div
ref="cesium-container"
class="cesium-container"
id="cesium-container"
style="grid-column: 2 / 3; overflow: hidden"
></div>
<div ref="cesium-container" class="cesium-container" id="cesium-container"
style="grid-column: 2 / 3; overflow: hidden">
</div>
<div>
<ModuleWrapper title="兵力编组" height="30%">
<template #extra>
<a-button type="text-primary" icon="plus" @click="handleOpenBlbzModal()"></a-button>
<a-modal
v-model="blbzModal.visible"
:title="'兵力编组-' + (blbz.modelData && (blbz.modelData.resourceName || blbz.modelData.title))"
width="900px"
:maskClosable="false"
:destroyOnClose="true"
@ok="handleSubmitBlbz()"
>
<a-modal v-model="blbzModal.visible"
:title="'兵力编组-' + (blbz.modelData && (blbz.modelData.resourceName || blbz.modelData.title))" width="900px"
:maskClosable="false" :destroyOnClose="true" @ok="handleSubmitBlbz()">
<Grid :columns="['300px', 1]" :rows="[1, 1]" style="height: 600px">
<ModuleWrapper title="组织机构" style="grid-row: 1 / 3">
<a-tree
class="simulation-tree"
:treeData="blbzModal.treeData"
:checkable="true"
v-model="blbzModal.checkedKeys"
:selectedKeys.sync="blbzModal.selectedKeys"
@select="() => ($refs['zzry-table'].commitAction('query'), $refs['zzzb-table'].commitAction('query'))"
>
<a-tree class="simulation-tree" :treeData="blbzModal.treeData" :checkable="true"
v-model="blbzModal.checkedKeys" :selectedKeys.sync="blbzModal.selectedKeys"
@select="() => ($refs['zzry-table'].commitAction('query'), $refs['zzzb-table'].commitAction('query'))">
</a-tree>
</ModuleWrapper>
<ModuleWrapper title="组织人员">
<AntQueryTable
ref="zzry-table"
height="100%"
:queryConfig="blbzModal.zzry.queryConfig"
:tableConfig="blbzModal.zzry.tableConfig"
:pageConfig="blbzModal.zzry.pageConfig"
:showTool="blbzModal.zzry.showTool"
>
<AntQueryTable ref="zzry-table" height="100%" :queryConfig="blbzModal.zzry.queryConfig"
:tableConfig="blbzModal.zzry.tableConfig" :pageConfig="blbzModal.zzry.pageConfig"
:showTool="blbzModal.zzry.showTool">
</AntQueryTable>
</ModuleWrapper>
<ModuleWrapper title="组织机构">
<AntQueryTable
ref="zzzb-table"
height="100%"
:queryConfig="blbzModal.zzzb.queryConfig"
:tableConfig="blbzModal.zzzb.tableConfig"
:pageConfig="blbzModal.zzzb.pageConfig"
:showTool="blbzModal.zzzb.showTool"
>
<AntQueryTable ref="zzzb-table" height="100%" :queryConfig="blbzModal.zzzb.queryConfig"
:tableConfig="blbzModal.zzzb.tableConfig" :pageConfig="blbzModal.zzzb.pageConfig"
:showTool="blbzModal.zzzb.showTool">
</AntQueryTable>
</ModuleWrapper>
</Grid>
</a-modal>
</template>
<div class="normal" style="padding: 5px; overflow-y: auto">
<a-tree
class="simulation-tree"
:treeData="showBlbzCheckedTreeData"
:selectable="false"
:replaceFields="{ children: 'children', title: 'title', key: 'id' }"
>
<a-tree class="simulation-tree" :treeData="showBlbzCheckedTreeData" :selectable="false"
:replaceFields="{ children: 'children', title: 'title', key: 'id' }">
</a-tree>
</div>
</ModuleWrapper>
@ -156,12 +98,14 @@
<a-radio-group v-model="modelInfoType" button-style="solid">
<a-radio-button value="jcsx">基础属性</a-radio-button>
<a-radio-button value="zzxd">作战行动</a-radio-button>
<a-radio-button value="bzrw">保障任务</a-radio-button>
</a-radio-group>
</template>
<div class="normal" style="padding: 15px 0">
<div style="height: 100%; padding: 0 15px; overflow-y: auto">
<Jcsx v-if="modelInfoType === 'jcsx'" :scenarioId="scenarioId" :modelData="jcsx.data" />
<Zzxd v-if="modelInfoType === 'zzxd'" :actionList="zzxd.data" />
<BzTask v-if="modelInfoType === 'bzrw'" :scenarioId="scenarioId" :resourceid="resourceid" :type="type" />
</div>
</div>
</ModuleWrapper>
@ -173,6 +117,7 @@
import { getAction, postAction } from '@/api/manage'
import Jcsx from './Jcsx.vue'
import Zzxd from './Zzxd.vue'
import BzTask from './BzTask.vue'
export default {
props: {
@ -181,9 +126,12 @@ export default {
components: {
Jcsx,
Zzxd,
BzTask
},
data() {
return {
resourceid: null, // id
type: null, //
scenarioDetail: {},
zzbzll: {
treeData: [],
@ -206,17 +154,19 @@ export default {
{ title: '蓝方', id: 1 },
],
typeOptions: [
{ title: '飞机', id: 1 },
{ title: '地面设施与兵力', id: 2 },
{ title: '舰船', id: 3 },
{ title: '潜艇', id: 4 },
// { title: '', id: 1 },
// { title: '', id: 2 },
// { title: '', id: 3 },
// { title: '', id: 4 },
{ title: '作战分队', id: 5 },
{ title: '保障分队', id: 6 },
{ title: '医院', id: 7 },
{ title: '仓库', id: 8 },
],
queryParams: {
keyword: '',
force: 0,
type: 1,
type: 5,
},
listData: [],
},
@ -441,9 +391,12 @@ export default {
}
},
handleSelectZzbzll(selectedKeys, { node }) {
handleSelectZzbzll(selectedKeys, { node }) {
console.log('选择信息', node.dataRef)
this.cesium.setClientByCenter({ longitude: +node.dataRef.lng, latitude: +node.dataRef.lat })
this.blbz.modelData = node.dataRef
this.resourceid = node.dataRef.id
this.type = node.dataRef.type
this.getBlbzTreeData()
this.getJcsxData()
},
@ -504,26 +457,33 @@ export default {
.tool-wrapper {
grid-column: ~'1 / 4';
}
.simulation-tree::v-deep {
color: #a1c2d0;
li .ant-tree-node-content-wrapper {
color: #a1c2d0;
}
li .ant-tree-node-content-wrapper.ant-tree-node-selected {
background-color: #bae7ff44;
}
li .ant-tree-node-content-wrapper:hover {
background-color: #bae7ff22;
}
}
.model-item {
width: calc(100% / 3);
.model-image {
width: 74px;
height: 62px;
object-fit: cover;
margin: 16px 0 8px;
}
.model-name {
white-space: nowrap;
max-width: 100%;
@ -531,6 +491,7 @@ export default {
text-overflow: ellipsis;
}
}
.model-item:hover {
.model-name {
overflow: visible;