提交任务和物资管理
This commit is contained in:
parent
77615cddef
commit
84fd9770a8
|
@ -1,39 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<page-header-wrapper>
|
<page-header-wrapper>
|
||||||
<Grid :columns="['400px', 1]" :rows="gridRows">
|
<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>
|
<template #extra>
|
||||||
<a-button type="primary" icon="plus" shape="circle" title="新增" @click="handleOpenAddZzjgModal()"></a-button>
|
<a-button type="primary" icon="plus" shape="circle" title="新增" @click="handleOpenAddZzjgModal()"></a-button>
|
||||||
</template>
|
</template>
|
||||||
<a-tree
|
<a-tree :treeData="zzjg.treeData" :selectedKeys.sync="zzjg.selectedKeys" :expandedKeys.sync="zzjg.expandedKeys"
|
||||||
:treeData="zzjg.treeData"
|
@select="handleChangeZzjgSelected">
|
||||||
:selectedKeys.sync="zzjg.selectedKeys"
|
|
||||||
:expandedKeys.sync="zzjg.expandedKeys"
|
|
||||||
@select="handleChangeZzjgSelected"
|
|
||||||
>
|
|
||||||
<template #title="{ key: id, title }">
|
<template #title="{ key: id, title }">
|
||||||
<a-dropdown :trigger="['contextmenu']">
|
<a-dropdown :trigger="['contextmenu']">
|
||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<Flex class="contextmenu-zz">
|
<Flex class="contextmenu-zz">
|
||||||
<a-button
|
<a-button type="text-primary" icon="edit" title="编辑" @click="handleOpenEditZzjgModal(id)"></a-button>
|
||||||
type="text-primary"
|
<a-button type="text-primary" icon="plus" title="新增子项" @click="handleOpenAddZzjgModal(id)"></a-button>
|
||||||
icon="edit"
|
<a-button type="text-danger" icon="delete" title="删除" @click="handleDeleteZzjg(id, title)"></a-button>
|
||||||
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>
|
</Flex>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
|
@ -43,22 +24,12 @@
|
||||||
<a-card title="组织人员" class="my-card my-card-has-title" :bordered="false">
|
<a-card title="组织人员" class="my-card my-card-has-title" :bordered="false">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzryModal">新增</a-button>
|
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzryModal">新增</a-button>
|
||||||
<a-icon
|
<a-icon v-if="layoutRight === 'zzry'" type="fullscreen-exit" style="font-size: 32px"
|
||||||
v-if="layoutRight === 'zzry'"
|
@click="layoutRight = 'auto'" />
|
||||||
type="fullscreen-exit"
|
|
||||||
style="font-size: 32px"
|
|
||||||
@click="layoutRight = 'auto'"
|
|
||||||
/>
|
|
||||||
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzry'" />
|
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzry'" />
|
||||||
</template>
|
</template>
|
||||||
<AntQueryTable
|
<AntQueryTable ref="zzry-table" height="100%" :queryConfig="zzry.queryConfig" :tableConfig="zzry.tableConfig"
|
||||||
ref="zzry-table"
|
:pageConfig="zzry.pageConfig" :showTool="zzry.showTool">
|
||||||
height="100%"
|
|
||||||
:queryConfig="zzry.queryConfig"
|
|
||||||
:tableConfig="zzry.tableConfig"
|
|
||||||
:pageConfig="zzry.pageConfig"
|
|
||||||
:showTool="zzry.showTool"
|
|
||||||
>
|
|
||||||
<template #tablecell-action="{ record }">
|
<template #tablecell-action="{ record }">
|
||||||
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzryModal(record)"></a-button>
|
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzryModal(record)"></a-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -67,55 +38,46 @@
|
||||||
<a-card title="组织装备" class="my-card my-card-has-title" :bordered="false">
|
<a-card title="组织装备" class="my-card my-card-has-title" :bordered="false">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzzbModal">新增</a-button>
|
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzzbModal">新增</a-button>
|
||||||
<a-icon
|
<a-icon v-if="layoutRight === 'zzzb'" type="fullscreen-exit" style="font-size: 32px"
|
||||||
v-if="layoutRight === 'zzzb'"
|
@click="layoutRight = 'auto'" />
|
||||||
type="fullscreen-exit"
|
|
||||||
style="font-size: 32px"
|
|
||||||
@click="layoutRight = 'auto'"
|
|
||||||
/>
|
|
||||||
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzzb'" />
|
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzzb'" />
|
||||||
</template>
|
</template>
|
||||||
<AntQueryTable
|
<AntQueryTable ref="zzzb-table" height="100%" :queryConfig="zzzb.queryConfig" :tableConfig="zzzb.tableConfig"
|
||||||
ref="zzzb-table"
|
:pageConfig="zzzb.pageConfig" :showTool="zzzb.showTool">
|
||||||
height="100%"
|
|
||||||
:queryConfig="zzzb.queryConfig"
|
|
||||||
:tableConfig="zzzb.tableConfig"
|
|
||||||
:pageConfig="zzzb.pageConfig"
|
|
||||||
:showTool="zzzb.showTool"
|
|
||||||
>
|
|
||||||
<template #tablecell-action="{ record }">
|
<template #tablecell-action="{ record }">
|
||||||
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzzbModal(record)"></a-button>
|
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzzbModal(record)"></a-button>
|
||||||
</template>
|
</template>
|
||||||
</AntQueryTable>
|
</AntQueryTable>
|
||||||
</a-card>
|
</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>
|
</Grid>
|
||||||
<AntFormModal
|
<AntFormModal :visible.sync="zzjgModal.visible" :title="zzjgModal.title" :formItems="zzjgModal.formItems"
|
||||||
:visible.sync="zzjgModal.visible"
|
:formRules="zzjgModal.formRules" :formData="zzjgModal.formData" :onSubmit="handleSubmitZzjg"
|
||||||
:title="zzjgModal.title"
|
@success="handleSubmitZzjgSuccess"></AntFormModal>
|
||||||
:formItems="zzjgModal.formItems"
|
<AntFormModal :visible.sync="zzryModal.visible" :title="zzryModal.title" :formItems="zzryModal.formItems"
|
||||||
:formRules="zzjgModal.formRules"
|
:formRules="zzryModal.formRules" :formData="zzryModal.formData" :onSubmit="handleSubmitZzry"
|
||||||
:formData="zzjgModal.formData"
|
@success="handleSubmitZzrySuccess"></AntFormModal>
|
||||||
:onSubmit="handleSubmitZzjg"
|
<AntFormModal :visible.sync="zzzbModal.visible" :title="zzzbModal.title" :formItems="zzzbFormItems"
|
||||||
@success="handleSubmitZzjgSuccess"
|
:formRules="zzzbModal.formRules" :formData="zzzbModal.formData" :onSubmit="handleSubmitZzzb"
|
||||||
></AntFormModal>
|
@success="handleSubmitZzzbSuccess"></AntFormModal>
|
||||||
<AntFormModal
|
<!-- 组织物资模态框 -->
|
||||||
:visible.sync="zzryModal.visible"
|
<AntFormModal :visible.sync="zzwzModal.visible" :title="zzwzModal.title" :formItems="zzwzFormItems"
|
||||||
:title="zzryModal.title"
|
:formRules="zzwzModal.formRules" :formData="zzwzModal.formData" :onSubmit="handleSubmitZzwz"
|
||||||
:formItems="zzryModal.formItems"
|
@success="handleSubmitZzwzSuccess"></AntFormModal>
|
||||||
: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>
|
|
||||||
</page-header-wrapper>
|
</page-header-wrapper>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -259,36 +221,105 @@ export default {
|
||||||
},
|
},
|
||||||
formData: {},
|
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: {
|
computed: {
|
||||||
gridRows() {
|
gridRows() {
|
||||||
return {
|
return {
|
||||||
auto: [1, 1],
|
auto: [1, 1, 1],
|
||||||
zzry: [1, '56px'],
|
zzry: [1, '56px', '56px'],
|
||||||
zzzb: ['56px', 1],
|
zzzb: ['56px', 1, '56px'],
|
||||||
|
zzwz: ['56px', '56px', 1],
|
||||||
}[this.layoutRight]
|
}[this.layoutRight]
|
||||||
},
|
},
|
||||||
zzzbFormItems() {
|
zzzbFormItems() {
|
||||||
return [
|
return [
|
||||||
this.zzzbModal.mode === 'add'
|
this.zzzbModal.mode === 'add'
|
||||||
? {
|
? {
|
||||||
label: '装备名称',
|
label: '装备名称',
|
||||||
prop: 'weaponId',
|
prop: 'weaponId',
|
||||||
component: 'AntOriginTreeSelect',
|
component: 'AntOriginTreeSelect',
|
||||||
options: {
|
options: {
|
||||||
dataSource: () =>
|
dataSource: () =>
|
||||||
this.$http({
|
this.$http({
|
||||||
url: '/tree/armament',
|
url: '/tree/armament',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
}),
|
}),
|
||||||
readonly: false,
|
readonly: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: { label: '装备名称', prop: 'name', customRender: (v) => v },
|
: { label: '装备名称', prop: 'name', customRender: (v) => v },
|
||||||
{ label: '装备数量', prop: 'number' },
|
{ 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() {
|
created() {
|
||||||
this.getZzTree()
|
this.getZzTree()
|
||||||
|
@ -311,6 +342,7 @@ export default {
|
||||||
handleChangeZzjgSelected() {
|
handleChangeZzjgSelected() {
|
||||||
this.$refs['zzry-table'].commitAction('reload')
|
this.$refs['zzry-table'].commitAction('reload')
|
||||||
this.$refs['zzzb-table'].commitAction('reload')
|
this.$refs['zzzb-table'].commitAction('reload')
|
||||||
|
this.$refs['zzwz-table'].commitAction('reload')
|
||||||
},
|
},
|
||||||
handleOpenAddZzjgModal(parentId) {
|
handleOpenAddZzjgModal(parentId) {
|
||||||
this.zzjgModal.title = '新建作战力量'
|
this.zzjgModal.title = '新建作战力量'
|
||||||
|
@ -352,7 +384,7 @@ export default {
|
||||||
})
|
})
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
this.getZzTree()
|
this.getZzTree()
|
||||||
} catch (error) {}
|
} catch (error) { }
|
||||||
},
|
},
|
||||||
|
|
||||||
handleOpenAddZzryModal() {
|
handleOpenAddZzryModal() {
|
||||||
|
@ -402,6 +434,30 @@ export default {
|
||||||
handleSubmitZzzbSuccess() {
|
handleSubmitZzzbSuccess() {
|
||||||
this.$refs['zzzb-table'].commitAction('query')
|
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>
|
</script>
|
||||||
|
|
228
src/views/simulationScene/sceneEditing/components/BzTask.vue
Normal file
228
src/views/simulationScene/sceneEditing/components/BzTask.vue
Normal 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>
|
|
@ -7,39 +7,21 @@
|
||||||
<a-button type="text-primary" icon="sync" style="font-size: 20px" @click="getZzbzllTreeData()"></a-button>
|
<a-button type="text-primary" icon="sync" style="font-size: 20px" @click="getZzbzllTreeData()"></a-button>
|
||||||
</template>
|
</template>
|
||||||
<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" :treeData="zzbzll.treeData" :selectedKeys.sync="zzbzll.selectedKeys"
|
||||||
class="simulation-tree"
|
:replaceFields="{ children: 'children', title: 'title', key: 'id' }" @select="handleSelectZzbzll">
|
||||||
:treeData="zzbzll.treeData"
|
|
||||||
:selectedKeys.sync="zzbzll.selectedKeys"
|
|
||||||
:replaceFields="{ children: 'children', title: 'title', key: 'id' }"
|
|
||||||
@select="handleSelectZzbzll"
|
|
||||||
>
|
|
||||||
<template #title="{ id, dataRef }">
|
<template #title="{ id, dataRef }">
|
||||||
<a-dropdown :trigger="['contextmenu']">
|
<a-dropdown :trigger="['contextmenu']">
|
||||||
<span>{{ dataRef.resourceName || dataRef.title }}</span>
|
<span>{{ dataRef.resourceName || dataRef.title }}</span>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<Flex>
|
<Flex>
|
||||||
<a-button
|
<a-button type="text-primary" icon="edit" title="修改名称"
|
||||||
type="text-primary"
|
@click="handleOpenEditZzbzllModal(id, dataRef)"></a-button>
|
||||||
icon="edit"
|
<AntFormModal :visible.sync="zzbzllModal.visible" :title="zzbzllModal.title"
|
||||||
title="修改名称"
|
:formItems="zzbzllModal.formItems" :formRules="zzbzllModal.formRules"
|
||||||
@click="handleOpenEditZzbzllModal(id, dataRef)"
|
:formData="zzbzllModal.formData" :onSubmit="handleSubmitZzbzll"
|
||||||
></a-button>
|
@success="handleSubmitZzbzllSuccess"></AntFormModal>
|
||||||
<AntFormModal
|
<a-button type="text-danger" icon="delete" title="删除"
|
||||||
:visible.sync="zzbzllModal.visible"
|
@click="handleDeleteZzbzll(id, dataRef)"></a-button>
|
||||||
: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>
|
</Flex>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
|
@ -56,25 +38,12 @@
|
||||||
</template>
|
</template>
|
||||||
<Flex class="normal" fd="co" style="padding: 5px">
|
<Flex class="normal" fd="co" style="padding: 5px">
|
||||||
<template v-if="model.type === 'zbys'">
|
<template v-if="model.type === 'zbys'">
|
||||||
<a-input-search
|
<a-input-search v-model="model.queryParams.keyword" placeholder="输入关键词搜索..." @search="getZbysListData()" />
|
||||||
v-model="model.queryParams.keyword"
|
|
||||||
placeholder="输入关键词搜索..."
|
|
||||||
@search="getZbysListData()"
|
|
||||||
/>
|
|
||||||
<Flex>
|
<Flex>
|
||||||
<AntOriginSelect
|
<AntOriginSelect v-model="model.queryParams.force" :dataSource="() => ({ data: model.forceOptions })"
|
||||||
v-model="model.queryParams.force"
|
width="100px" :allowClear="false" />
|
||||||
:dataSource="() => ({ data: model.forceOptions })"
|
<AntOriginSelect v-model="model.queryParams.type" :dataSource="() => ({ data: model.typeOptions })"
|
||||||
width="100px"
|
class="flex-1" :allowClear="false" @change="getZbysListData()" />
|
||||||
:allowClear="false"
|
|
||||||
/>
|
|
||||||
<AntOriginSelect
|
|
||||||
v-model="model.queryParams.type"
|
|
||||||
:dataSource="() => ({ data: model.typeOptions })"
|
|
||||||
class="flex-1"
|
|
||||||
:allowClear="false"
|
|
||||||
@change="getZbysListData()"
|
|
||||||
/>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex class="flex-1 scroller-y" fw="w" ac="fs">
|
<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">
|
<Flex v-for="item in model.listData" :key="item.id" class="model-item" fd="co" ai="c">
|
||||||
|
@ -86,68 +55,41 @@
|
||||||
</Flex>
|
</Flex>
|
||||||
</ModuleWrapper>
|
</ModuleWrapper>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div ref="cesium-container" class="cesium-container" id="cesium-container"
|
||||||
ref="cesium-container"
|
style="grid-column: 2 / 3; overflow: hidden">
|
||||||
class="cesium-container"
|
</div>
|
||||||
id="cesium-container"
|
|
||||||
style="grid-column: 2 / 3; overflow: hidden"
|
|
||||||
></div>
|
|
||||||
<div>
|
<div>
|
||||||
<ModuleWrapper title="兵力编组" height="30%">
|
<ModuleWrapper title="兵力编组" height="30%">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<a-button type="text-primary" icon="plus" @click="handleOpenBlbzModal()"></a-button>
|
<a-button type="text-primary" icon="plus" @click="handleOpenBlbzModal()"></a-button>
|
||||||
<a-modal
|
<a-modal v-model="blbzModal.visible"
|
||||||
v-model="blbzModal.visible"
|
:title="'兵力编组-' + (blbz.modelData && (blbz.modelData.resourceName || blbz.modelData.title))" width="900px"
|
||||||
:title="'兵力编组-' + (blbz.modelData && (blbz.modelData.resourceName || blbz.modelData.title))"
|
:maskClosable="false" :destroyOnClose="true" @ok="handleSubmitBlbz()">
|
||||||
width="900px"
|
|
||||||
:maskClosable="false"
|
|
||||||
:destroyOnClose="true"
|
|
||||||
@ok="handleSubmitBlbz()"
|
|
||||||
>
|
|
||||||
<Grid :columns="['300px', 1]" :rows="[1, 1]" style="height: 600px">
|
<Grid :columns="['300px', 1]" :rows="[1, 1]" style="height: 600px">
|
||||||
<ModuleWrapper title="组织机构" style="grid-row: 1 / 3">
|
<ModuleWrapper title="组织机构" style="grid-row: 1 / 3">
|
||||||
<a-tree
|
<a-tree class="simulation-tree" :treeData="blbzModal.treeData" :checkable="true"
|
||||||
class="simulation-tree"
|
v-model="blbzModal.checkedKeys" :selectedKeys.sync="blbzModal.selectedKeys"
|
||||||
:treeData="blbzModal.treeData"
|
@select="() => ($refs['zzry-table'].commitAction('query'), $refs['zzzb-table'].commitAction('query'))">
|
||||||
:checkable="true"
|
|
||||||
v-model="blbzModal.checkedKeys"
|
|
||||||
:selectedKeys.sync="blbzModal.selectedKeys"
|
|
||||||
@select="() => ($refs['zzry-table'].commitAction('query'), $refs['zzzb-table'].commitAction('query'))"
|
|
||||||
>
|
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</ModuleWrapper>
|
</ModuleWrapper>
|
||||||
<ModuleWrapper title="组织人员">
|
<ModuleWrapper title="组织人员">
|
||||||
<AntQueryTable
|
<AntQueryTable ref="zzry-table" height="100%" :queryConfig="blbzModal.zzry.queryConfig"
|
||||||
ref="zzry-table"
|
:tableConfig="blbzModal.zzry.tableConfig" :pageConfig="blbzModal.zzry.pageConfig"
|
||||||
height="100%"
|
:showTool="blbzModal.zzry.showTool">
|
||||||
:queryConfig="blbzModal.zzry.queryConfig"
|
|
||||||
:tableConfig="blbzModal.zzry.tableConfig"
|
|
||||||
:pageConfig="blbzModal.zzry.pageConfig"
|
|
||||||
:showTool="blbzModal.zzry.showTool"
|
|
||||||
>
|
|
||||||
</AntQueryTable>
|
</AntQueryTable>
|
||||||
</ModuleWrapper>
|
</ModuleWrapper>
|
||||||
<ModuleWrapper title="组织机构">
|
<ModuleWrapper title="组织机构">
|
||||||
<AntQueryTable
|
<AntQueryTable ref="zzzb-table" height="100%" :queryConfig="blbzModal.zzzb.queryConfig"
|
||||||
ref="zzzb-table"
|
:tableConfig="blbzModal.zzzb.tableConfig" :pageConfig="blbzModal.zzzb.pageConfig"
|
||||||
height="100%"
|
:showTool="blbzModal.zzzb.showTool">
|
||||||
:queryConfig="blbzModal.zzzb.queryConfig"
|
|
||||||
:tableConfig="blbzModal.zzzb.tableConfig"
|
|
||||||
:pageConfig="blbzModal.zzzb.pageConfig"
|
|
||||||
:showTool="blbzModal.zzzb.showTool"
|
|
||||||
>
|
|
||||||
</AntQueryTable>
|
</AntQueryTable>
|
||||||
</ModuleWrapper>
|
</ModuleWrapper>
|
||||||
</Grid>
|
</Grid>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
<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" :treeData="showBlbzCheckedTreeData" :selectable="false"
|
||||||
class="simulation-tree"
|
:replaceFields="{ children: 'children', title: 'title', key: 'id' }">
|
||||||
:treeData="showBlbzCheckedTreeData"
|
|
||||||
:selectable="false"
|
|
||||||
:replaceFields="{ children: 'children', title: 'title', key: 'id' }"
|
|
||||||
>
|
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</div>
|
</div>
|
||||||
</ModuleWrapper>
|
</ModuleWrapper>
|
||||||
|
@ -156,12 +98,14 @@
|
||||||
<a-radio-group v-model="modelInfoType" button-style="solid">
|
<a-radio-group v-model="modelInfoType" button-style="solid">
|
||||||
<a-radio-button value="jcsx">基础属性</a-radio-button>
|
<a-radio-button value="jcsx">基础属性</a-radio-button>
|
||||||
<a-radio-button value="zzxd">作战行动</a-radio-button>
|
<a-radio-button value="zzxd">作战行动</a-radio-button>
|
||||||
|
<a-radio-button value="bzrw">保障任务</a-radio-button>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</template>
|
</template>
|
||||||
<div class="normal" style="padding: 15px 0">
|
<div class="normal" style="padding: 15px 0">
|
||||||
<div style="height: 100%; padding: 0 15px; overflow-y: auto">
|
<div style="height: 100%; padding: 0 15px; overflow-y: auto">
|
||||||
<Jcsx v-if="modelInfoType === 'jcsx'" :scenarioId="scenarioId" :modelData="jcsx.data" />
|
<Jcsx v-if="modelInfoType === 'jcsx'" :scenarioId="scenarioId" :modelData="jcsx.data" />
|
||||||
<Zzxd v-if="modelInfoType === 'zzxd'" :actionList="zzxd.data" />
|
<Zzxd v-if="modelInfoType === 'zzxd'" :actionList="zzxd.data" />
|
||||||
|
<BzTask v-if="modelInfoType === 'bzrw'" :scenarioId="scenarioId" :resourceid="resourceid" :type="type" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ModuleWrapper>
|
</ModuleWrapper>
|
||||||
|
@ -173,6 +117,7 @@
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
import Jcsx from './Jcsx.vue'
|
import Jcsx from './Jcsx.vue'
|
||||||
import Zzxd from './Zzxd.vue'
|
import Zzxd from './Zzxd.vue'
|
||||||
|
import BzTask from './BzTask.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
@ -181,9 +126,12 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
Jcsx,
|
Jcsx,
|
||||||
Zzxd,
|
Zzxd,
|
||||||
|
BzTask
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
resourceid: null, // 分队id
|
||||||
|
type: null, // 红蓝类型
|
||||||
scenarioDetail: {},
|
scenarioDetail: {},
|
||||||
zzbzll: {
|
zzbzll: {
|
||||||
treeData: [],
|
treeData: [],
|
||||||
|
@ -206,17 +154,19 @@ export default {
|
||||||
{ title: '蓝方', id: 1 },
|
{ title: '蓝方', id: 1 },
|
||||||
],
|
],
|
||||||
typeOptions: [
|
typeOptions: [
|
||||||
{ title: '飞机', id: 1 },
|
// { title: '飞机', id: 1 },
|
||||||
{ title: '地面设施与兵力', id: 2 },
|
// { title: '地面设施与兵力', id: 2 },
|
||||||
{ title: '舰船', id: 3 },
|
// { title: '舰船', id: 3 },
|
||||||
{ title: '潜艇', id: 4 },
|
// { title: '潜艇', id: 4 },
|
||||||
{ title: '作战分队', id: 5 },
|
{ title: '作战分队', id: 5 },
|
||||||
{ title: '保障分队', id: 6 },
|
{ title: '保障分队', id: 6 },
|
||||||
|
{ title: '医院', id: 7 },
|
||||||
|
{ title: '仓库', id: 8 },
|
||||||
],
|
],
|
||||||
queryParams: {
|
queryParams: {
|
||||||
keyword: '',
|
keyword: '',
|
||||||
force: 0,
|
force: 0,
|
||||||
type: 1,
|
type: 5,
|
||||||
},
|
},
|
||||||
listData: [],
|
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.cesium.setClientByCenter({ longitude: +node.dataRef.lng, latitude: +node.dataRef.lat })
|
||||||
this.blbz.modelData = node.dataRef
|
this.blbz.modelData = node.dataRef
|
||||||
|
this.resourceid = node.dataRef.id
|
||||||
|
this.type = node.dataRef.type
|
||||||
this.getBlbzTreeData()
|
this.getBlbzTreeData()
|
||||||
this.getJcsxData()
|
this.getJcsxData()
|
||||||
},
|
},
|
||||||
|
@ -504,26 +457,33 @@ export default {
|
||||||
.tool-wrapper {
|
.tool-wrapper {
|
||||||
grid-column: ~'1 / 4';
|
grid-column: ~'1 / 4';
|
||||||
}
|
}
|
||||||
|
|
||||||
.simulation-tree::v-deep {
|
.simulation-tree::v-deep {
|
||||||
color: #a1c2d0;
|
color: #a1c2d0;
|
||||||
|
|
||||||
li .ant-tree-node-content-wrapper {
|
li .ant-tree-node-content-wrapper {
|
||||||
color: #a1c2d0;
|
color: #a1c2d0;
|
||||||
}
|
}
|
||||||
|
|
||||||
li .ant-tree-node-content-wrapper.ant-tree-node-selected {
|
li .ant-tree-node-content-wrapper.ant-tree-node-selected {
|
||||||
background-color: #bae7ff44;
|
background-color: #bae7ff44;
|
||||||
}
|
}
|
||||||
|
|
||||||
li .ant-tree-node-content-wrapper:hover {
|
li .ant-tree-node-content-wrapper:hover {
|
||||||
background-color: #bae7ff22;
|
background-color: #bae7ff22;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.model-item {
|
.model-item {
|
||||||
width: calc(100% / 3);
|
width: calc(100% / 3);
|
||||||
|
|
||||||
.model-image {
|
.model-image {
|
||||||
width: 74px;
|
width: 74px;
|
||||||
height: 62px;
|
height: 62px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
margin: 16px 0 8px;
|
margin: 16px 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.model-name {
|
.model-name {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
@ -531,6 +491,7 @@ export default {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.model-item:hover {
|
.model-item:hover {
|
||||||
.model-name {
|
.model-name {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user