From 84fd9770a86b48ae92d23dad9313b0117811d725 Mon Sep 17 00:00:00 2001
From: wangchengming <15110151257@163.com>
Date: Sun, 14 Sep 2025 15:21:00 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=BB=E5=8A=A1=E5=92=8C?=
=?UTF-8?q?=E7=89=A9=E8=B5=84=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../simulationScene/database/zzllsjk.vue | 248 +++++++++++-------
.../sceneEditing/components/BzTask.vue | 228 ++++++++++++++++
.../sceneEditing/components/SceneEditing.vue | 153 ++++-------
3 files changed, 437 insertions(+), 192 deletions(-)
create mode 100644 src/views/simulationScene/sceneEditing/components/BzTask.vue
diff --git a/src/views/simulationScene/database/zzllsjk.vue b/src/views/simulationScene/database/zzllsjk.vue
index a7319ee..b78dcb7 100644
--- a/src/views/simulationScene/database/zzllsjk.vue
+++ b/src/views/simulationScene/database/zzllsjk.vue
@@ -1,39 +1,20 @@
-
+
-
+
{{ title }}
@@ -43,22 +24,12 @@
新增
-
+
-
+
@@ -67,55 +38,46 @@
新增
-
+
-
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
@@ -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')
+ },
},
}
diff --git a/src/views/simulationScene/sceneEditing/components/BzTask.vue b/src/views/simulationScene/sceneEditing/components/BzTask.vue
new file mode 100644
index 0000000..19af669
--- /dev/null
+++ b/src/views/simulationScene/sceneEditing/components/BzTask.vue
@@ -0,0 +1,228 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/simulationScene/sceneEditing/components/SceneEditing.vue b/src/views/simulationScene/sceneEditing/components/SceneEditing.vue
index 987058a..6d8e9c1 100644
--- a/src/views/simulationScene/sceneEditing/components/SceneEditing.vue
+++ b/src/views/simulationScene/sceneEditing/components/SceneEditing.vue
@@ -7,39 +7,21 @@
-
+
{{ dataRef.resourceName || dataRef.title }}
-
-
-
+
+
+
@@ -56,25 +38,12 @@
-
+
-
-
+
+
@@ -86,68 +55,41 @@
-
+
+
-
+
- ($refs['zzry-table'].commitAction('query'), $refs['zzzb-table'].commitAction('query'))"
- >
+ ($refs['zzry-table'].commitAction('query'), $refs['zzzb-table'].commitAction('query'))">
-
+
-
+
@@ -156,12 +98,14 @@
基础属性
作战行动
+ 保障任务
@@ -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;