coding
This commit is contained in:
parent
f4e0fffe0f
commit
68ccb3d2ec
323
src/views/simulationScene/database/bzhjsjk.vue
Normal file
323
src/views/simulationScene/database/bzhjsjk.vue
Normal file
|
|
@ -0,0 +1,323 @@
|
||||||
|
<template>
|
||||||
|
<page-header-wrapper>
|
||||||
|
<Grid :columns="['400px', 1]" :rows="gridRows">
|
||||||
|
<a-card
|
||||||
|
title="想定列表"
|
||||||
|
class="my-card my-card-has-title"
|
||||||
|
:bordered="false"
|
||||||
|
v-loading="xd.loading"
|
||||||
|
style="grid-row: 1 / 3"
|
||||||
|
>
|
||||||
|
<template #extra>
|
||||||
|
<a-icon type="sync" style="font-size: 30px" @click="getXdListData()" />
|
||||||
|
</template>
|
||||||
|
<a-tree
|
||||||
|
:treeData="xd.listData"
|
||||||
|
:replaceFields="{ title: 'name', key: 'id' }"
|
||||||
|
:selectedKeys.sync="xd.selectedKeys"
|
||||||
|
@select="handleChangeXdSelected"
|
||||||
|
>
|
||||||
|
</a-tree>
|
||||||
|
</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="handleOpenAddQxhjModal">新增</a-button>
|
||||||
|
<a-icon
|
||||||
|
v-if="layoutRight === 'qxhj'"
|
||||||
|
type="fullscreen-exit"
|
||||||
|
style="font-size: 32px"
|
||||||
|
@click="layoutRight = 'auto'"
|
||||||
|
/>
|
||||||
|
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'qxhj'" />
|
||||||
|
</template>
|
||||||
|
<AntQueryTable
|
||||||
|
ref="qxhj-table"
|
||||||
|
height="100%"
|
||||||
|
:queryConfig="qxhj.queryConfig"
|
||||||
|
:tableConfig="qxhj.tableConfig"
|
||||||
|
:pageConfig="qxhj.pageConfig"
|
||||||
|
:showTool="qxhj.showTool"
|
||||||
|
>
|
||||||
|
<template #tablecell-action="{ record }">
|
||||||
|
<a-button type="text-primary" icon="edit" @click="handleOpenEditQxhjModal(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="handleOpenAddDchjModal">新增</a-button>
|
||||||
|
<a-icon
|
||||||
|
v-if="layoutRight === 'dchj'"
|
||||||
|
type="fullscreen-exit"
|
||||||
|
style="font-size: 32px"
|
||||||
|
@click="layoutRight = 'auto'"
|
||||||
|
/>
|
||||||
|
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'dchj'" />
|
||||||
|
</template>
|
||||||
|
<AntQueryTable
|
||||||
|
ref="dchj-table"
|
||||||
|
height="100%"
|
||||||
|
:queryConfig="dchj.queryConfig"
|
||||||
|
:tableConfig="dchj.tableConfig"
|
||||||
|
:pageConfig="dchj.pageConfig"
|
||||||
|
:showTool="dchj.showTool"
|
||||||
|
>
|
||||||
|
<template #tablecell-action="{ record }">
|
||||||
|
<a-button type="text-primary" icon="edit" @click="handleOpenEditDchjModal(record)"></a-button>
|
||||||
|
</template>
|
||||||
|
</AntQueryTable>
|
||||||
|
</a-card>
|
||||||
|
</Grid>
|
||||||
|
<AntFormModal
|
||||||
|
:visible.sync="qxhjModal.visible"
|
||||||
|
:title="qxhjModal.title"
|
||||||
|
:formItems="qxhjModal.formItems"
|
||||||
|
:formRules="qxhjModal.formRules"
|
||||||
|
:formData="qxhjModal.formData"
|
||||||
|
:onSubmit="handleSubmitQxhj"
|
||||||
|
@success="handleSubmitQxhjSuccess"
|
||||||
|
></AntFormModal>
|
||||||
|
<AntFormModal
|
||||||
|
:visible.sync="dchjModal.visible"
|
||||||
|
:title="dchjModal.title"
|
||||||
|
:formItems="dchjModal.formItems"
|
||||||
|
:formRules="dchjModal.formRules"
|
||||||
|
:formData="dchjModal.formData"
|
||||||
|
:onSubmit="handleSubmitDchj"
|
||||||
|
@success="handleSubmitDchjSuccess"
|
||||||
|
></AntFormModal>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Bzhjsjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
layoutRight: 'auto',
|
||||||
|
xd: {
|
||||||
|
loading: false,
|
||||||
|
listData: [],
|
||||||
|
selectedKeys: [],
|
||||||
|
},
|
||||||
|
|
||||||
|
qxhj: {
|
||||||
|
queryConfig: false,
|
||||||
|
tableConfig: {
|
||||||
|
table: {},
|
||||||
|
immediate: false,
|
||||||
|
query: (queryParams) =>
|
||||||
|
this.$http({
|
||||||
|
url: `/environment/weather/list`,
|
||||||
|
method: 'get',
|
||||||
|
params: { id: this.xd.selectedKeys[0], ...queryParams },
|
||||||
|
}),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '区域', dataIndex: 'area' },
|
||||||
|
{ title: '日期', dataIndex: 'date' },
|
||||||
|
{ title: '天气', dataIndex: 'weather' },
|
||||||
|
{ title: '大气压', dataIndex: 'airPressure' },
|
||||||
|
{ title: '空气质量', dataIndex: 'airQuality' },
|
||||||
|
{ title: '湿度', dataIndex: 'humidity' },
|
||||||
|
{ title: '降水量', dataIndex: 'precipitation' },
|
||||||
|
{ title: '能见度', dataIndex: 'visibility' },
|
||||||
|
{ title: '风向', dataIndex: 'windDirection' },
|
||||||
|
{ title: '风力', dataIndex: 'windPower' },
|
||||||
|
{ title: '风速', dataIndex: 'windSpeed' },
|
||||||
|
{ dataIndex: 'action', width: 100 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: true,
|
||||||
|
showTool: false,
|
||||||
|
},
|
||||||
|
qxhjModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
mode: '',
|
||||||
|
formItems: [
|
||||||
|
{
|
||||||
|
label: '区域',
|
||||||
|
prop: 'area',
|
||||||
|
component: 'AntOriginSelect',
|
||||||
|
options: { dataSource: () => this.$http({ url: `/system/area/getTreeSelect`, method: 'get' }) },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '日期',
|
||||||
|
prop: 'date',
|
||||||
|
component: 'a-date-picker',
|
||||||
|
options: { format: 'YYYY/MM/DD', valueFormat: 'YYYY/MM/DD' },
|
||||||
|
},
|
||||||
|
{ label: '天气', prop: 'weather' },
|
||||||
|
{ label: '大气压', prop: 'airPressure' },
|
||||||
|
{ label: '空气质量', prop: 'airQuality' },
|
||||||
|
{ label: '湿度', prop: 'humidity' },
|
||||||
|
{ label: '降水量', prop: 'precipitation' },
|
||||||
|
{ label: '能见度', prop: 'visibility' },
|
||||||
|
{ label: '风向', prop: 'windDirection' },
|
||||||
|
{ label: '风力', prop: 'windPower' },
|
||||||
|
{ label: '风速', prop: 'windSpeed' },
|
||||||
|
],
|
||||||
|
formRules: {},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
|
||||||
|
dchj: {
|
||||||
|
queryConfig: false,
|
||||||
|
tableConfig: {
|
||||||
|
table: {},
|
||||||
|
immediate: false,
|
||||||
|
query: (queryParams) =>
|
||||||
|
this.$http({
|
||||||
|
url: `/environment/ebe/list`,
|
||||||
|
method: 'get',
|
||||||
|
params: { id: this.xd.selectedKeys[0], ...queryParams },
|
||||||
|
}),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '区域', dataIndex: 'area' },
|
||||||
|
{ title: '持续时间', dataIndex: 'duration' },
|
||||||
|
{ title: '环境变化趋势', dataIndex: 'environmentalChangeTrends' },
|
||||||
|
{ title: '环境复杂度', dataIndex: 'environmentalComplexity' },
|
||||||
|
{ title: '磁场强度', dataIndex: 'fieldStrength' },
|
||||||
|
{ title: '频率', dataIndex: 'frequency' },
|
||||||
|
{ title: '频率区间', dataIndex: 'frequencyRang' },
|
||||||
|
{ title: '干扰幅度', dataIndex: 'interferenceAmplitude' },
|
||||||
|
{ title: '干扰源', dataIndex: 'interferenceSource' },
|
||||||
|
{ title: '干扰类型', dataIndex: 'interferenceType' },
|
||||||
|
{ title: '波型', dataIndex: 'waveType' },
|
||||||
|
{ dataIndex: 'action', width: 100 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: true,
|
||||||
|
showTool: false,
|
||||||
|
},
|
||||||
|
dchjModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
mode: '',
|
||||||
|
formItems: [
|
||||||
|
{
|
||||||
|
label: '区域',
|
||||||
|
prop: 'area',
|
||||||
|
component: 'AntOriginSelect',
|
||||||
|
options: { dataSource: () => this.$http({ url: `/system/area/getTreeSelect`, method: 'get' }) },
|
||||||
|
},
|
||||||
|
{ label: '持续时间', prop: 'duration' },
|
||||||
|
{ label: '环境变化趋势', prop: 'environmentalChangeTrends' },
|
||||||
|
{ label: '环境复杂度', prop: 'environmentalComplexity' },
|
||||||
|
{ label: '磁场强度', prop: 'fieldStrength' },
|
||||||
|
{ label: '频率', prop: 'frequency' },
|
||||||
|
{ label: '频率区间', prop: 'frequencyRang' },
|
||||||
|
{ label: '干扰幅度', prop: 'interferenceAmplitude' },
|
||||||
|
{ label: '干扰源', prop: 'interferenceSource' },
|
||||||
|
{ label: '干扰类型', prop: 'interferenceType' },
|
||||||
|
{ label: '波型', prop: 'waveType' },
|
||||||
|
],
|
||||||
|
formRules: {},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
gridRows() {
|
||||||
|
return {
|
||||||
|
auto: [1, 1],
|
||||||
|
qxhj: [1, '56px'],
|
||||||
|
dchj: ['56px', 1],
|
||||||
|
}[this.layoutRight]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getXdListData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getXdListData() {
|
||||||
|
try {
|
||||||
|
this.xd.loading = true
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/baseData/scenario/all`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.xd.listData = res.data
|
||||||
|
if (this.xd.selectedKeys.length === 0) {
|
||||||
|
this.xd.selectedKeys = [this.xd.listData[0].id]
|
||||||
|
this.handleChangeXdSelected()
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
} finally {
|
||||||
|
this.xd.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChangeXdSelected() {
|
||||||
|
this.$refs['qxhj-table'].commitAction('query')
|
||||||
|
this.$refs['dchj-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
|
||||||
|
handleOpenAddQxhjModal() {
|
||||||
|
this.qxhjModal.title = '新建气象环境'
|
||||||
|
this.qxhjModal.mode = 'add'
|
||||||
|
this.qxhjModal.formData = { sceneId: this.xd.selectedKeys[0] }
|
||||||
|
this.qxhjModal.visible = true
|
||||||
|
},
|
||||||
|
async handleOpenEditQxhjModal(record) {
|
||||||
|
try {
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/environment/weather/${record.id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.qxhjModal.title = `编辑气象环境`
|
||||||
|
this.qxhjModal.mode = 'edit'
|
||||||
|
this.qxhjModal.formData = { ...res.data }
|
||||||
|
this.qxhjModal.visible = true
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmitQxhj(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: `/environment/weather/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitQxhjSuccess() {
|
||||||
|
this.$refs['qxhj-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
|
||||||
|
handleOpenAddDchjModal() {
|
||||||
|
this.dchjModal.title = '新建电磁环境'
|
||||||
|
this.dchjModal.mode = 'add'
|
||||||
|
this.dchjModal.formData = { sceneId: this.xd.selectedKeys[0] }
|
||||||
|
this.dchjModal.visible = true
|
||||||
|
},
|
||||||
|
async handleOpenEditDchjModal(record) {
|
||||||
|
try {
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/environment/ebe/${record.id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.dchjModal.title = `编辑电磁环境`
|
||||||
|
this.dchjModal.mode = 'edit'
|
||||||
|
this.dchjModal.formData = { ...res.data }
|
||||||
|
this.dchjModal.visible = true
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmitDchj(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: `/environment/ebe/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitDchjSuccess() {
|
||||||
|
this.$refs['dchj-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
416
src/views/simulationScene/database/bzllsjk.vue
Normal file
416
src/views/simulationScene/database/bzllsjk.vue
Normal file
|
|
@ -0,0 +1,416 @@
|
||||||
|
<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">
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
</Flex>
|
||||||
|
</template>
|
||||||
|
</a-dropdown>
|
||||||
|
</template>
|
||||||
|
</a-tree>
|
||||||
|
</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="handleOpenAddZzryModal">新增</a-button>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<template #tablecell-action="{ record }">
|
||||||
|
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzryModal(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="handleOpenAddZzzbModal">新增</a-button>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<template #tablecell-action="{ record }">
|
||||||
|
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzzbModal(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>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Bzllsjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
layoutRight: 'auto',
|
||||||
|
zzjg: {
|
||||||
|
treeData: [],
|
||||||
|
selectedKeys: [],
|
||||||
|
expandedKeys: [],
|
||||||
|
},
|
||||||
|
zzjgModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
mode: '',
|
||||||
|
formItems: [
|
||||||
|
{
|
||||||
|
label: '上级组织',
|
||||||
|
prop: 'parentId',
|
||||||
|
component: 'AntOriginTreeSelect',
|
||||||
|
options: {
|
||||||
|
dataSource: () =>
|
||||||
|
this.$http({
|
||||||
|
url: '/tree/organization',
|
||||||
|
method: 'get',
|
||||||
|
params: { unittype: 2 },
|
||||||
|
}).then((res) => ({ data: [{ key: 0, title: '根组织' }].concat(res.data) })),
|
||||||
|
valueKey: 'key',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '标识编码',
|
||||||
|
prop: 'codeName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '组织名称',
|
||||||
|
prop: 'name',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
formRules: {
|
||||||
|
codeName: [{ required: true, message: '请输入标识编码!', trigger: 'blur' }],
|
||||||
|
name: [{ required: true, message: '请输入组织名称!', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
|
||||||
|
zzry: {
|
||||||
|
queryConfig: false,
|
||||||
|
tableConfig: {
|
||||||
|
table: {},
|
||||||
|
immediate: false,
|
||||||
|
query: () =>
|
||||||
|
this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/staff/${this.zzjg.selectedKeys[0]}`,
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '岗位', dataIndex: 'name', width: 'auto', minWidth: 150 },
|
||||||
|
{ title: '岗位数量', dataIndex: 'number', type: 'number', width: 'auto', minWidth: 150 },
|
||||||
|
{ dataIndex: 'action' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: false,
|
||||||
|
showTool: false,
|
||||||
|
},
|
||||||
|
zzryModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
mode: '',
|
||||||
|
formItems: [
|
||||||
|
{
|
||||||
|
label: '岗位名称',
|
||||||
|
prop: 'typeId',
|
||||||
|
component: 'AntOriginSelect',
|
||||||
|
options: {
|
||||||
|
dataSource: () =>
|
||||||
|
this.$http({
|
||||||
|
url: '/unit/getAll',
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
labelKey: 'name',
|
||||||
|
readonly: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ label: '岗位数量', prop: 'number' },
|
||||||
|
],
|
||||||
|
formRules: {
|
||||||
|
typeId: [{ required: true, message: '请选择岗位!', trigger: 'change' }],
|
||||||
|
number: [{ required: true, message: '请输入岗位数量!', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
|
||||||
|
zzzb: {
|
||||||
|
queryConfig: false,
|
||||||
|
tableConfig: {
|
||||||
|
table: {},
|
||||||
|
immediate: false,
|
||||||
|
query: () =>
|
||||||
|
this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/weapon/${this.zzjg.selectedKeys[0]}`,
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '装备名称', dataIndex: 'name', width: 'auto', minWidth: 150 },
|
||||||
|
{ title: '装备数量', dataIndex: 'number', type: 'number', width: 'auto', minWidth: 150 },
|
||||||
|
{ dataIndex: 'action' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: false,
|
||||||
|
showTool: false,
|
||||||
|
},
|
||||||
|
zzzbModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
mode: '',
|
||||||
|
formItems: [
|
||||||
|
{
|
||||||
|
label: '装备名称',
|
||||||
|
prop: 'weaponId',
|
||||||
|
component: 'AntOriginTreeSelect',
|
||||||
|
options: {
|
||||||
|
dataSource: () =>
|
||||||
|
this.$http({
|
||||||
|
url: '/tree/armament',
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
readonly: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ label: '装备数量', prop: 'number' },
|
||||||
|
],
|
||||||
|
formRules: {
|
||||||
|
weaponId: [{ required: true, message: '请选择装备!', trigger: 'change' }],
|
||||||
|
number: [{ required: true, message: '请输入装备数量!', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
gridRows() {
|
||||||
|
return {
|
||||||
|
auto: [1, 1],
|
||||||
|
zzry: [1, '56px'],
|
||||||
|
zzzb: ['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: 'name', customRender: (v) => v },
|
||||||
|
{ label: '装备数量', prop: 'number' },
|
||||||
|
]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getZzTree()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getZzTree() {
|
||||||
|
try {
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/tree/organization`,
|
||||||
|
method: 'get',
|
||||||
|
params: { unittype: 2 },
|
||||||
|
})
|
||||||
|
this.zzjg.treeData = res.data
|
||||||
|
this.zzjg.selectedKeys = [this.zzjg.treeData[0].key]
|
||||||
|
this.handleChangeZzjgSelected()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChangeZzjgSelected() {
|
||||||
|
this.$refs['zzry-table'].commitAction('reload')
|
||||||
|
this.$refs['zzzb-table'].commitAction('reload')
|
||||||
|
},
|
||||||
|
handleOpenAddZzjgModal(parentId) {
|
||||||
|
this.zzjgModal.title = '新建保障力量'
|
||||||
|
this.zzjgModal.mode = 'add'
|
||||||
|
this.zzjgModal.formData = { unittype: 2, parentId }
|
||||||
|
this.zzjgModal.visible = true
|
||||||
|
},
|
||||||
|
async handleOpenEditZzjgModal(id) {
|
||||||
|
try {
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/${id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.zzjgModal.title = '编辑保障力量'
|
||||||
|
this.zzjgModal.mode = 'edit'
|
||||||
|
this.zzjgModal.formData = res.data
|
||||||
|
this.zzjgModal.visible = true
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
this.$message.error('未知错误,请重试')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmitZzjg(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitZzjgSuccess() {
|
||||||
|
this.getZzTree()
|
||||||
|
},
|
||||||
|
async handleDeleteZzjg(id, title) {
|
||||||
|
try {
|
||||||
|
await this.$confirm({ content: `确定删除保障力量-${title}?` })
|
||||||
|
await this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/remove/${id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.getZzTree()
|
||||||
|
} catch (error) {}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleOpenAddZzryModal() {
|
||||||
|
this.zzryModal.title = '新建组织人员'
|
||||||
|
this.zzryModal.mode = 'add'
|
||||||
|
this.zzryModal.formData = { parentId: this.zzjg.selectedKeys[0] }
|
||||||
|
this.zzryModal.formItems[0].options.readonly = false
|
||||||
|
this.zzryModal.visible = true
|
||||||
|
},
|
||||||
|
handleOpenEditZzryModal(record) {
|
||||||
|
this.zzryModal.title = `编辑组织人员`
|
||||||
|
this.zzryModal.mode = 'edit'
|
||||||
|
this.zzryModal.formData = { ...record }
|
||||||
|
this.zzryModal.formItems[0].options.readonly = true
|
||||||
|
this.zzryModal.visible = true
|
||||||
|
},
|
||||||
|
handleSubmitZzry(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/staff/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitZzrySuccess() {
|
||||||
|
this.$refs['zzry-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
|
||||||
|
handleOpenAddZzzbModal() {
|
||||||
|
this.zzzbModal.title = '新建组织装备'
|
||||||
|
this.zzzbModal.mode = 'add'
|
||||||
|
this.zzzbModal.formData = { parentId: this.zzjg.selectedKeys[0] }
|
||||||
|
this.zzzbModal.visible = true
|
||||||
|
},
|
||||||
|
handleOpenEditZzzbModal(record) {
|
||||||
|
this.zzzbModal.title = `编辑组织装备`
|
||||||
|
this.zzzbModal.mode = 'edit'
|
||||||
|
this.zzzbModal.formData = { ...record }
|
||||||
|
this.zzzbModal.visible = true
|
||||||
|
},
|
||||||
|
handleSubmitZzzb(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/weapon/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitZzzbSuccess() {
|
||||||
|
this.$refs['zzzb-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.contextmenu-zz {
|
||||||
|
padding: 5px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 0 5px #aaaaaa;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
24
src/views/simulationScene/database/components/EditIcon.vue
Normal file
24
src/views/simulationScene/database/components/EditIcon.vue
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<template>
|
||||||
|
<Grid
|
||||||
|
:columns="[5, 3, 2]"
|
||||||
|
:rows="[2, 3, 5]"
|
||||||
|
gap="0px"
|
||||||
|
:style="{ width: size, height: size, cursor: 'pointer' }"
|
||||||
|
title="修改军标"
|
||||||
|
v-on="$listeners"
|
||||||
|
>
|
||||||
|
<a-icon type="picture" :style="{ fontSize: `calc(${size} * 8 / 10)`, gridColumn: '1 / 3', gridRow: '2 / 4' }" />
|
||||||
|
<a-icon type="setting" :style="{ fontSize: `calc(${size} * 5 / 10)`, gridColumn: '2 / 4', gridRow: '1 / 3' }" />
|
||||||
|
</Grid>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
size: { type: String, default: '30px' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
</style>
|
||||||
207
src/views/simulationScene/database/fasjk.vue
Normal file
207
src/views/simulationScene/database/fasjk.vue
Normal file
|
|
@ -0,0 +1,207 @@
|
||||||
|
<template>
|
||||||
|
<page-header-wrapper>
|
||||||
|
<Grid :columns="[1, 1, 1]">
|
||||||
|
<a-card title="想定列表" class="my-card my-card-has-title" :bordered="false" v-loading="xd.loading">
|
||||||
|
<template #extra>
|
||||||
|
<a-icon type="sync" style="font-size: 30px" @click="getXdListData()" />
|
||||||
|
</template>
|
||||||
|
<a-tree
|
||||||
|
:treeData="xd.listData"
|
||||||
|
:replaceFields="{ title: 'name', key: 'id' }"
|
||||||
|
:selectedKeys.sync="xd.selectedKeys"
|
||||||
|
@select="handleChangeXdSelected"
|
||||||
|
>
|
||||||
|
</a-tree>
|
||||||
|
</a-card>
|
||||||
|
<a-card title="作战/保障力量" class="my-card my-card-has-title" :bordered="false" v-loading="zzbzll.loading">
|
||||||
|
<template #extra>
|
||||||
|
<a-icon type="sync" style="font-size: 30px" @click="getZzbzllTreeData()" />
|
||||||
|
</template>
|
||||||
|
<a-tree
|
||||||
|
:treeData="zzbzll.treeData"
|
||||||
|
:replaceFields="{ title: 'name', key: 'id' }"
|
||||||
|
:selectedKeys.sync="zzbzll.selectedKeys"
|
||||||
|
:expandedKeys.sync="zzbzll.expandedKeys"
|
||||||
|
@select="handleChangeZzbzllSelected"
|
||||||
|
>
|
||||||
|
</a-tree>
|
||||||
|
</a-card>
|
||||||
|
<a-card title="兵力编组信息" class="my-card my-card-has-title" :bordered="false" v-loading="blbz.loading">
|
||||||
|
<template #extra>
|
||||||
|
<a-icon type="sync" style="font-size: 30px" @click="getBlbzTreeData()" />
|
||||||
|
</template>
|
||||||
|
<a-tree
|
||||||
|
:treeData="blbz.treeData"
|
||||||
|
:selectedKeys.sync="blbz.selectedKeys"
|
||||||
|
:expandedKeys.sync="blbz.expandedKeys"
|
||||||
|
@select="handleChangeBlbzSelected"
|
||||||
|
>
|
||||||
|
</a-tree>
|
||||||
|
</a-card>
|
||||||
|
</Grid>
|
||||||
|
<a-modal v-model="blbzModal.visible" :width="920" :maskClosable="false" :destroyOnClose="true" :footer="null">
|
||||||
|
<template #title>
|
||||||
|
<a-radio-group v-model="blbzModal.type" button-style="solid" @change="handleChangeBlbzModalType">
|
||||||
|
<a-radio-button value="staff">人员</a-radio-button>
|
||||||
|
<a-radio-button value="weapon">装备</a-radio-button>
|
||||||
|
</a-radio-group>
|
||||||
|
</template>
|
||||||
|
<AntQueryTable
|
||||||
|
height="600px"
|
||||||
|
ref="blbz-table"
|
||||||
|
:queryConfig="blbzModal.queryConfig"
|
||||||
|
:tableConfig="tableConfig"
|
||||||
|
:pageConfig="blbzModal.pageConfig"
|
||||||
|
:showTool="blbzModal.showTool"
|
||||||
|
></AntQueryTable>
|
||||||
|
</a-modal>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Fasjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
xd: {
|
||||||
|
loading: false,
|
||||||
|
listData: [],
|
||||||
|
selectedKeys: [],
|
||||||
|
},
|
||||||
|
zzbzll: {
|
||||||
|
loading: false,
|
||||||
|
treeData: [],
|
||||||
|
selectedKeys: [],
|
||||||
|
expandedKeys: [],
|
||||||
|
},
|
||||||
|
blbz: {
|
||||||
|
loading: false,
|
||||||
|
treeData: [],
|
||||||
|
selectedKeys: [],
|
||||||
|
expandedKeys: [],
|
||||||
|
},
|
||||||
|
blbzModal: {
|
||||||
|
visible: false,
|
||||||
|
type: 'staff',
|
||||||
|
queryConfig: false,
|
||||||
|
pageConfig: false,
|
||||||
|
showTool: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
tableConfig() {
|
||||||
|
return {
|
||||||
|
query: () =>
|
||||||
|
this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/${this.blbzModal.type}/${this.blbz.selectedKeys[0]}`,
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
immediate: false,
|
||||||
|
table: {},
|
||||||
|
columns: {
|
||||||
|
staff: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '岗位', dataIndex: 'name', width: 'auto', minWidth: 150 },
|
||||||
|
{ title: '岗位数量', dataIndex: 'number', type: 'number', width: 'auto', minWidth: 150 },
|
||||||
|
{ dataIndex: 'action' },
|
||||||
|
],
|
||||||
|
weapon: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '装备名称', dataIndex: 'name', width: 'auto', minWidth: 150 },
|
||||||
|
{ title: '装备数量', dataIndex: 'number', type: 'number', width: 'auto', minWidth: 150 },
|
||||||
|
{ dataIndex: 'action' },
|
||||||
|
],
|
||||||
|
}[this.blbzModal.type],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getXdListData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getXdListData() {
|
||||||
|
try {
|
||||||
|
this.xd.loading = true
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/baseData/scenario/all`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.xd.listData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
} finally {
|
||||||
|
this.xd.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChangeXdSelected() {
|
||||||
|
this.getZzbzllTreeData()
|
||||||
|
},
|
||||||
|
async getZzbzllTreeData() {
|
||||||
|
try {
|
||||||
|
this.zzbzll.loading = true
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/scenario/power/${this.xd.selectedKeys[0]}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.zzbzll.treeData = [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name: '红方',
|
||||||
|
selectable: false,
|
||||||
|
children: [
|
||||||
|
{ id: '1-1', name: '作战力量', selectable: false, children: res.data.red.fight },
|
||||||
|
{ id: '1-2', name: '保障力量', selectable: false, children: res.data.red.guarantee },
|
||||||
|
{ id: '1-3', name: '指挥力量', selectable: false, children: res.data.red.command },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name: '蓝方',
|
||||||
|
selectable: false,
|
||||||
|
children: [
|
||||||
|
{ id: '2-1', name: '作战力量', selectable: false, children: res.data.blue.fight },
|
||||||
|
{ id: '2-2', name: '保障力量', selectable: false, children: res.data.blue.guarantee },
|
||||||
|
{ id: '2-3', name: '指挥力量', selectable: false, children: res.data.blue.command },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
this.zzbzll.expandedKeys = ['1', '1-1', '1-2', '1-3', '2', '2-1', '2-2', '2-3']
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
} finally {
|
||||||
|
this.zzbzll.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChangeZzbzllSelected() {
|
||||||
|
this.getBlbzTreeData()
|
||||||
|
},
|
||||||
|
async getBlbzTreeData() {
|
||||||
|
try {
|
||||||
|
this.blbz.loading = true
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/blbz/${this.zzbzll.selectedKeys[0]}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.blbz.treeData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
this.blbz.treeData = [{ title: '123', key: '123' }]
|
||||||
|
} finally {
|
||||||
|
this.blbz.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChangeBlbzSelected() {
|
||||||
|
this.blbzModal.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['blbz-table'].commitAction('query')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleChangeBlbzModalType() {
|
||||||
|
this.$refs['blbz-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
120
src/views/simulationScene/database/fdsjk.vue
Normal file
120
src/views/simulationScene/database/fdsjk.vue
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
<template>
|
||||||
|
<page-header-wrapper>
|
||||||
|
<Grid>
|
||||||
|
<a-card class="my-card">
|
||||||
|
<AntQueryTable
|
||||||
|
height="100%"
|
||||||
|
ref="fd-table"
|
||||||
|
:queryConfig="fdTable.queryConfig"
|
||||||
|
:tableConfig="fdTable.tableConfig"
|
||||||
|
:pageConfig="fdTable.pageConfig"
|
||||||
|
:showTool="fdTable.showTool"
|
||||||
|
>
|
||||||
|
<template #toolbar-left>
|
||||||
|
<a-button type="primary" icon="plus" @click="handleOpenAddModal()">新增</a-button>
|
||||||
|
</template>
|
||||||
|
<template #tablecell-action="{ record }">
|
||||||
|
<a-button type="text-primary" icon="edit" @click="handleOpenEditModal(record)"></a-button>
|
||||||
|
<a-button type="text-danger" icon="delete" @click="handleDelete(record)"></a-button>
|
||||||
|
</template>
|
||||||
|
</AntQueryTable>
|
||||||
|
</a-card>
|
||||||
|
</Grid>
|
||||||
|
<AntFormModal
|
||||||
|
:visible.sync="AEModal.visible"
|
||||||
|
:title="AEModal.title"
|
||||||
|
width="900px"
|
||||||
|
:formConfig="{ labelCol: { span: 3 }, wrapperCol: { span: 19 } }"
|
||||||
|
:formItems="AEModal.formItems"
|
||||||
|
:formRules="AEModal.formRules"
|
||||||
|
:formData="AEModal.formData"
|
||||||
|
:onSubmit="handleSubmitAE"
|
||||||
|
@success="handleSubmitAESuccess"
|
||||||
|
></AntFormModal>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fdTable: {
|
||||||
|
queryConfig: false,
|
||||||
|
tableConfig: {
|
||||||
|
query: () => getAction('/team/list'),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ dataIndex: 'name', title: '分队名称', width: 'auto', minWidth: 160 },
|
||||||
|
{
|
||||||
|
dataIndex: 'type',
|
||||||
|
title: '分队类型',
|
||||||
|
width: 'auto',
|
||||||
|
minWidth: 160,
|
||||||
|
align: 'center',
|
||||||
|
customRender: (text) => ['作战分队', '保障分队'][text],
|
||||||
|
},
|
||||||
|
{ dataIndex: 'action' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: true,
|
||||||
|
showTool: true,
|
||||||
|
},
|
||||||
|
AEModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
formItems: [
|
||||||
|
{ label: '分队名称', prop: 'name' },
|
||||||
|
{
|
||||||
|
label: '分队类型',
|
||||||
|
prop: 'type',
|
||||||
|
component: 'AntOriginSelect',
|
||||||
|
options: {
|
||||||
|
dataSource: () => ({
|
||||||
|
data: [
|
||||||
|
{ title: '作战分队', id: 0 },
|
||||||
|
{ title: '保障分队', id: 1 },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ label: '分队军标', prop: 'iconId', component: 'IconSelector' },
|
||||||
|
],
|
||||||
|
formRules: {},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleOpenAddModal() {
|
||||||
|
this.AEModal.title = '新增分队'
|
||||||
|
this.AEModal.formData = {}
|
||||||
|
this.AEModal.visible = true
|
||||||
|
},
|
||||||
|
handleOpenEditModal(record) {
|
||||||
|
this.AEModal.title = '编辑分队'
|
||||||
|
this.AEModal.formData = { ...record }
|
||||||
|
this.AEModal.visible = true
|
||||||
|
},
|
||||||
|
handleSubmitAE(formData) {
|
||||||
|
return postAction('/team/save', formData)
|
||||||
|
},
|
||||||
|
handleSubmitAESuccess() {
|
||||||
|
this.$refs['fd-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
async handleDelete(record) {
|
||||||
|
try {
|
||||||
|
await this.$confirm({ title: '温馨提示', content: '确定要删除该分队吗?' })
|
||||||
|
const res = await getAction('/team/remove/' + record.id)
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.$refs['fd-table'].commitAction('query')
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
132
src/views/simulationScene/database/index.vue
Normal file
132
src/views/simulationScene/database/index.vue
Normal file
|
|
@ -0,0 +1,132 @@
|
||||||
|
<template>
|
||||||
|
<Grid class="database-page" :rows="[1, 1]">
|
||||||
|
<ModuleWrapper title="保障实体类数据库">
|
||||||
|
<Grid class="normal bzstlsjk" :columns="bzstlsjkColumns">
|
||||||
|
<div v-for="(item, index) in bzstlsjk" :key="index" class="sjk-item" @click="$router.push(item.path)">
|
||||||
|
<img :src="item.image" alt="" />
|
||||||
|
<div class="title">{{ item.title }}</div>
|
||||||
|
</div>
|
||||||
|
</Grid>
|
||||||
|
</ModuleWrapper>
|
||||||
|
<ModuleWrapper title="业务应用类数据库">
|
||||||
|
<Grid class="normal ywyylsjk" :columns="ywyylsjkColumns">
|
||||||
|
<div v-for="(item, index) in ywyylsjk" :key="index" class="sjk-item" @click="$router.push(item.path)">
|
||||||
|
<img :src="item.image" alt="" />
|
||||||
|
<div class="title">{{ item.title }}</div>
|
||||||
|
</div>
|
||||||
|
</Grid>
|
||||||
|
</ModuleWrapper>
|
||||||
|
</Grid>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'SimulationSceneDatabase',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
bzstlsjk: [
|
||||||
|
{
|
||||||
|
title: '作战力量数据库',
|
||||||
|
image: require('@/assets/images/simulation-scene/database/zzllsjk.png'),
|
||||||
|
path: '/databaseSystem/zzllsjk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '保障力量数据库',
|
||||||
|
image: require('@/assets/images/simulation-scene/database/bzllsjk.png'),
|
||||||
|
path: '/databaseSystem/bzllsjk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '保障环境数据库',
|
||||||
|
image: require('@/assets/images/simulation-scene/database/bzhjsjk.png'),
|
||||||
|
path: '/databaseSystem/bzhjsjk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '装备数据库',
|
||||||
|
image: require('@/assets/images/simulation-scene/database/bzhjsjk.png'),
|
||||||
|
path: '/databaseSystem/zbsjk',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
ywyylsjk: [
|
||||||
|
{
|
||||||
|
title: '想定数据库',
|
||||||
|
image: require('@/assets/images/simulation-scene/database/xdsjk.png'),
|
||||||
|
path: '/databaseSystem/xdsjk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '方案数据库',
|
||||||
|
image: require('@/assets/images/simulation-scene/database/fasjk.png'),
|
||||||
|
path: '/databaseSystem/fasjk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '进程数据库',
|
||||||
|
image: require('@/assets/images/simulation-scene/database/jcsjk.png'),
|
||||||
|
path: '/databaseSystem/jcsjk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '图形数据库',
|
||||||
|
image: require('@/assets/images/simulation-scene/database/txsjk.png'),
|
||||||
|
path: '/databaseSystem/txsjk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '运行记录数据库',
|
||||||
|
image: require('@/assets/images/simulation-scene/database/yxjlsjk.png'),
|
||||||
|
path: '/databaseSystem/yxjlsjk',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
bzstlsjkColumns() {
|
||||||
|
return new Array(this.bzstlsjk.length).fill(1)
|
||||||
|
},
|
||||||
|
ywyylsjkColumns() {
|
||||||
|
return new Array(this.ywyylsjk.length).fill(1)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.database-page {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
border: 1px solid #06445f;
|
||||||
|
}
|
||||||
|
.sjk-item {
|
||||||
|
position: relative;
|
||||||
|
cursor: pointer;
|
||||||
|
.title {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
background-color: #02223466;
|
||||||
|
border: 1px solid #17759e;
|
||||||
|
padding: 20px 0;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 1;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.sjk-item:hover {
|
||||||
|
.title {
|
||||||
|
background-color: #17759e99;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bzstlsjk {
|
||||||
|
.title {
|
||||||
|
width: 252px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ywyylsjk {
|
||||||
|
.title {
|
||||||
|
width: 222px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
98
src/views/simulationScene/database/jcsjk.vue
Normal file
98
src/views/simulationScene/database/jcsjk.vue
Normal file
|
|
@ -0,0 +1,98 @@
|
||||||
|
<template>
|
||||||
|
<page-header-wrapper>
|
||||||
|
<Grid :columns="['400px', 1]">
|
||||||
|
<a-card title="想定列表" class="my-card my-card-has-title" :bordered="false" v-loading="xd.loading">
|
||||||
|
<template #extra>
|
||||||
|
<a-icon type="sync" style="font-size: 30px" @click="getXdListData()" />
|
||||||
|
</template>
|
||||||
|
<a-tree
|
||||||
|
:treeData="xd.listData"
|
||||||
|
:replaceFields="{ title: 'name', key: 'id' }"
|
||||||
|
:selectedKeys.sync="xd.selectedKeys"
|
||||||
|
@select="handleChangeXdSelected"
|
||||||
|
>
|
||||||
|
</a-tree>
|
||||||
|
</a-card>
|
||||||
|
<a-card title="进程列表" class="my-card my-card-has-title" :bordered="false">
|
||||||
|
<template #extra>
|
||||||
|
<a-icon type="sync" style="font-size: 30px" @click="() => {}" />
|
||||||
|
</template>
|
||||||
|
<AntQueryTable
|
||||||
|
ref="jc-table"
|
||||||
|
height="100%"
|
||||||
|
:queryConfig="jc.queryConfig"
|
||||||
|
:tableConfig="jc.tableConfig"
|
||||||
|
:pageConfig="jc.pageConfig"
|
||||||
|
:showTool="jc.showTool"
|
||||||
|
>
|
||||||
|
</AntQueryTable>
|
||||||
|
</a-card>
|
||||||
|
</Grid>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Jcsjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
xd: {
|
||||||
|
loading: false,
|
||||||
|
listData: [],
|
||||||
|
selectedKeys: [],
|
||||||
|
},
|
||||||
|
jc: {
|
||||||
|
queryConfig: false,
|
||||||
|
tableConfig: {
|
||||||
|
table: {},
|
||||||
|
immediate: false,
|
||||||
|
query: () =>
|
||||||
|
this.$http({
|
||||||
|
url: '/baseData/scenario/taskList',
|
||||||
|
method: 'get',
|
||||||
|
params: { id: this.xd.selectedKeys[0] },
|
||||||
|
}).then((res) => ({
|
||||||
|
data: res.data.map(([a, b, c], index) => ({ id: index, 0: a, 1: b, 2: c })),
|
||||||
|
})),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '任务进程名称', dataIndex: '0', width: 'auto', minWidth: 150 },
|
||||||
|
{ title: '开始时间', dataIndex: '1', width: 'auto', minWidth: 150 },
|
||||||
|
{ title: '失效时间', dataIndex: '2', width: 'auto', minWidth: 150 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: false,
|
||||||
|
showTool: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getXdListData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getXdListData() {
|
||||||
|
try {
|
||||||
|
this.xd.loading = true
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/baseData/scenario/all`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.xd.listData = res.data
|
||||||
|
if (this.xd.selectedKeys.length === 0) {
|
||||||
|
this.xd.selectedKeys = [this.xd.listData[0].id]
|
||||||
|
this.handleChangeXdSelected()
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
} finally {
|
||||||
|
this.xd.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChangeXdSelected() {
|
||||||
|
this.$refs['jc-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
1860
src/views/simulationScene/database/modules/componentDlg.vue
Normal file
1860
src/views/simulationScene/database/modules/componentDlg.vue
Normal file
File diff suppressed because it is too large
Load Diff
2778
src/views/simulationScene/database/modules/componentEditlistData.js
Normal file
2778
src/views/simulationScene/database/modules/componentEditlistData.js
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,154 @@
|
||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
:visible="visible"
|
||||||
|
:mask-closable="false"
|
||||||
|
title="详情"
|
||||||
|
:width="848"
|
||||||
|
:footer="null"
|
||||||
|
destroyOnClose
|
||||||
|
@cancel="close">
|
||||||
|
<a-table :columns="populationColumn" :dataSource="populationList" :pagination="false" :scroll="{x:true}" bordered>
|
||||||
|
<template slot="serial" slot-scope="text, record, index0">
|
||||||
|
{{ index0 + 1 }}
|
||||||
|
</template>
|
||||||
|
<template slot="valuetype" slot-scope="text, record">
|
||||||
|
<!-- 公共ID展示 -->
|
||||||
|
<template v-if="record.translate == '#DBID'">
|
||||||
|
{{ record.value }}
|
||||||
|
</template>
|
||||||
|
<!-- 判断展示类型为:详情 -->
|
||||||
|
<template v-if="text == 'combobox'">
|
||||||
|
<template v-if="record.fieldname == 'Type'">
|
||||||
|
{{ record.value }}
|
||||||
|
</template>
|
||||||
|
<template v-if="record.fieldname == 'Category'">
|
||||||
|
{{ record.value }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="text == 'combostr'">
|
||||||
|
<span v-for="(item1,index1) in record.value.split(',')" :key="index1">
|
||||||
|
<span v-for="(item2,index2) in dicData.operatorcountry" :key="index2">
|
||||||
|
<span v-if="item2.id == item1">
|
||||||
|
<span style="margin-right:5px;">{{ item2.description }}</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="text == 'combotree'">
|
||||||
|
<span v-for="(item1,index1) in treeData" :key="index1">
|
||||||
|
<span v-if="item1.key == record.value">
|
||||||
|
{{ item1.title }}
|
||||||
|
</span>
|
||||||
|
<span v-for="(item2,index2) in item1.children" :key="index2">
|
||||||
|
<span v-if="item2.key == record.value">
|
||||||
|
{{ item2.title }}
|
||||||
|
</span>
|
||||||
|
<span v-for="(item3,index3) in item2.children" :key="index3">
|
||||||
|
<span v-if="item3.key == record.value">
|
||||||
|
{{ item3.title }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="text == 'checkbox'">
|
||||||
|
<span v-if="record.value == 1">是</span>
|
||||||
|
<span v-if="record.value == 0">否</span>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<template v-if="record.translate != '#DBID'">
|
||||||
|
{{ record.value }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction } from '@/api/manage'
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
populationList: [],
|
||||||
|
populationColumn: [
|
||||||
|
{
|
||||||
|
title: '',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'serial'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '参数',
|
||||||
|
key: 'translate',
|
||||||
|
dataIndex: 'translate',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'translate'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
key: 'valuetype',
|
||||||
|
dataIndex: 'valuetype',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'valuetype'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
entityType: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
guid: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},//主键id
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
visible (val) {
|
||||||
|
if (val) {
|
||||||
|
this.getData()
|
||||||
|
console.log(this.id, 'id888')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData () {
|
||||||
|
const entityType1 = this.entityType.toLowerCase()
|
||||||
|
getAction('/dbdata/aircraft/getInfoList',{
|
||||||
|
tableName: 'Data' + this.entityType
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
getAction('/basedata/' + entityType1 + '/getInfo?id=' + this.id, {}).then((res2) => {
|
||||||
|
for(const i in res.data) {
|
||||||
|
for(const j in res2.data) {
|
||||||
|
if(j == res.data[i].fieldname) {
|
||||||
|
console.log(res.data[i],'res.data[i]')
|
||||||
|
res.data[i].value = res2.data[j]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.populationList = res.data
|
||||||
|
console.log(this.populationList,'this.populationList')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.populationList = []
|
||||||
|
this.$emit('closeModal')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
731
src/views/simulationScene/database/modules/listColsConfig.js
Normal file
731
src/views/simulationScene/database/modules/listColsConfig.js
Normal file
|
|
@ -0,0 +1,731 @@
|
||||||
|
// 配置列表要显示的列信息
|
||||||
|
export var listGridInfo = {
|
||||||
|
'Aircraft':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '国家',
|
||||||
|
key: 'operatorCountry',
|
||||||
|
dataIndex: 'operatorCountry',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorCountry'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '军种',
|
||||||
|
key: 'operatorService',
|
||||||
|
dataIndex: 'operatorService',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorService'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '造价(百万,¥)',
|
||||||
|
key: 'cost',
|
||||||
|
dataIndex: 'cost',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'cost'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服役年',
|
||||||
|
key: 'yearCommissioned',
|
||||||
|
dataIndex: 'yearCommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearCommissioned'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退役年',
|
||||||
|
key: 'yearDecommissioned',
|
||||||
|
dataIndex: 'yearDecommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearDecommissioned'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Ship':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '类别',
|
||||||
|
key: 'category',
|
||||||
|
dataIndex: 'category',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'category'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属国',
|
||||||
|
key: 'operatorCountry',
|
||||||
|
dataIndex: 'operatorCountry',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorCountry'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属军种',
|
||||||
|
key: 'operatorService',
|
||||||
|
dataIndex: 'operatorService',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorService'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '造价(百万,¥)',
|
||||||
|
key: 'cost',
|
||||||
|
dataIndex: 'cost',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'cost'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '服役年',
|
||||||
|
key: 'yearCommissioned',
|
||||||
|
dataIndex: 'yearCommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearCommissioned'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退役年',
|
||||||
|
key: 'yearDecommissioned',
|
||||||
|
dataIndex: 'yearDecommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearDecommissioned'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Submarine':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '类别',
|
||||||
|
key: 'category',
|
||||||
|
dataIndex: 'category',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'category'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属国',
|
||||||
|
key: 'operatorCountry',
|
||||||
|
dataIndex: 'operatorCountry',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorCountry'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属军种',
|
||||||
|
key: 'operatorService',
|
||||||
|
dataIndex: 'operatorService',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorService'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '造价(百万,¥)',
|
||||||
|
key: 'cost',
|
||||||
|
dataIndex: 'cost',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'cost'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '服役年',
|
||||||
|
key: 'yearCommissioned',
|
||||||
|
dataIndex: 'yearCommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearCommissioned'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退役年',
|
||||||
|
key: 'yearDecommissioned',
|
||||||
|
dataIndex: 'yearDecommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearDecommissioned'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Weapon':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '生产年代',
|
||||||
|
key: 'generation',
|
||||||
|
dataIndex: 'generation',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'generation'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属国',
|
||||||
|
key: 'operatorCountry',
|
||||||
|
dataIndex: 'operatorCountry',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorCountry'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '造价(百万,¥)',
|
||||||
|
key: 'cost',
|
||||||
|
dataIndex: 'cost',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'cost'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Facility':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '类别',
|
||||||
|
key: 'category',
|
||||||
|
dataIndex: 'category',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'category'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属国',
|
||||||
|
key: 'operatorCountry',
|
||||||
|
dataIndex: 'operatorCountry',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorCountry'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属军种',
|
||||||
|
key: 'operatorService',
|
||||||
|
dataIndex: 'operatorService',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorService'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '造价(百万,¥)',
|
||||||
|
key: 'cost',
|
||||||
|
dataIndex: 'cost',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'cost'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '服役年',
|
||||||
|
key: 'yearCommissioned',
|
||||||
|
dataIndex: 'yearCommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearCommissioned'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退役年',
|
||||||
|
key: 'yearDecommissioned',
|
||||||
|
dataIndex: 'yearDecommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearDecommissioned'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Satellite':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '类别',
|
||||||
|
key: 'category',
|
||||||
|
dataIndex: 'category',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'category'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属国',
|
||||||
|
key: 'operatorCountry',
|
||||||
|
dataIndex: 'operatorCountry',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorCountry'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属军种',
|
||||||
|
key: 'operatorService',
|
||||||
|
dataIndex: 'operatorService',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorService'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '造价(百万,¥)',
|
||||||
|
key: 'cost',
|
||||||
|
dataIndex: 'cost',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'cost'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '服役年',
|
||||||
|
key: 'yearCommissioned',
|
||||||
|
dataIndex: 'yearCommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearCommissioned'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退役年',
|
||||||
|
key: 'yearDecommissioned',
|
||||||
|
dataIndex: 'yearDecommissioned',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'yearDecommissioned'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Comm':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Sensor':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '最大作用距离(公里)',
|
||||||
|
key: 'rangeMax',
|
||||||
|
dataIndex: 'rangeMax',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'rangeMax'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Loadout':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '挂载方案的作用',
|
||||||
|
key: 'loadoutRole',
|
||||||
|
dataIndex: 'loadoutRole',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'loadoutRole'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Magazine':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '装甲',
|
||||||
|
key: 'armorGeneral',
|
||||||
|
dataIndex: 'armorGeneral',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'armorGeneral'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '补给间隔时间(秒)',
|
||||||
|
key: 'rof',
|
||||||
|
dataIndex: 'rof',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'rof'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '容量',
|
||||||
|
key: 'capacity',
|
||||||
|
dataIndex: 'capacity',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'capacity'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Mount':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Propulsion':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'Warhead':{
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '炸药类型',
|
||||||
|
key: 'explosivesType',
|
||||||
|
dataIndex: 'explosivesType',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'explosivesType'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '注释',
|
||||||
|
key: 'comments',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'comments'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
Laser: {
|
||||||
|
cols:[
|
||||||
|
{
|
||||||
|
title: '#DBID',
|
||||||
|
key: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'name'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '类型',
|
||||||
|
key: 'type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'type'
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
title: '所属国',
|
||||||
|
key: 'operatorCountry',
|
||||||
|
dataIndex: 'operatorCountry',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'operatorCountry'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
110
src/views/simulationScene/database/txsjk.vue
Normal file
110
src/views/simulationScene/database/txsjk.vue
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
<template>
|
||||||
|
<page-header-wrapper>
|
||||||
|
<Grid>
|
||||||
|
<a-card class="my-card">
|
||||||
|
<AntQueryTable
|
||||||
|
height="100%"
|
||||||
|
ref="tx-table"
|
||||||
|
:queryConfig="txTable.queryConfig"
|
||||||
|
:tableConfig="txTable.tableConfig"
|
||||||
|
:pageConfig="txTable.pageConfig"
|
||||||
|
:showTool="txTable.showTool"
|
||||||
|
>
|
||||||
|
<template #toolbar-left>
|
||||||
|
<a-button type="primary" icon="plus" @click="handleOpenAddModal">新增</a-button>
|
||||||
|
</template>
|
||||||
|
<template #tablecell-iconBase64="{ text }">
|
||||||
|
<img :src="text" alt="" style="width: 100px; height: 70px; object-fit: contain" />
|
||||||
|
</template>
|
||||||
|
<template #tablecell-action="{ record }">
|
||||||
|
<a-button type="text-primary" icon="edit" @click="handleOpenEditModal(record)"></a-button>
|
||||||
|
<a-button type="text-danger" icon="delete" @click="handleDelete(record)"></a-button>
|
||||||
|
</template>
|
||||||
|
</AntQueryTable>
|
||||||
|
</a-card>
|
||||||
|
</Grid>
|
||||||
|
<AntFormModal
|
||||||
|
:visible.sync="AEModal.visible"
|
||||||
|
:title="AEModal.title"
|
||||||
|
width="900px"
|
||||||
|
:formConfig="{ labelCol: { span: 3 }, wrapperCol: { span: 19 } }"
|
||||||
|
:formItems="AEModal.formItems"
|
||||||
|
:formRules="AEModal.formRules"
|
||||||
|
:formData="AEModal.formData"
|
||||||
|
:onSubmit="handleSubmitAE"
|
||||||
|
@success="handleSubmitAESuccess"
|
||||||
|
></AntFormModal>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { deleteAction, getAction, postAction, putAction } from '@/api/manage'
|
||||||
|
export default {
|
||||||
|
name: 'Txsjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
txTable: {
|
||||||
|
queryConfig: false,
|
||||||
|
tableConfig: {
|
||||||
|
query: () => getAction('/icon/list'),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ dataIndex: 'iconName', title: '军标名称', width: 'auto', align: 'center' },
|
||||||
|
{ dataIndex: 'iconBase64', title: '军标图片', width: 'auto', align: 'center' },
|
||||||
|
{ dataIndex: 'action' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: true,
|
||||||
|
showTool: true,
|
||||||
|
},
|
||||||
|
AEModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '新增图形',
|
||||||
|
formItems: [
|
||||||
|
{ label: '军标名称', prop: 'iconName' },
|
||||||
|
{ label: '军标图片', prop: 'iconBase64', component: 'Image2Base64' },
|
||||||
|
],
|
||||||
|
formRules: {},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleOpenAddModal() {
|
||||||
|
this.AEModal.formData = {}
|
||||||
|
this.AEModal.visible = true
|
||||||
|
},
|
||||||
|
async handleOpenEditModal(record) {
|
||||||
|
try {
|
||||||
|
const res = await getAction(`/icon/${record.id}`)
|
||||||
|
this.AEModal.formData = res.data
|
||||||
|
this.AEModal.visible = true
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmitAE(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: '/icon/save',
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitAESuccess() {
|
||||||
|
this.$refs['tx-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
async handleDelete(record) {
|
||||||
|
try {
|
||||||
|
await this.$confirm({ title: '温馨提示', content: '确定要删除该军标吗?' })
|
||||||
|
const res = await getAction('/icon/remove/' + record.id)
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.$refs['tx-table'].commitAction('query')
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
133
src/views/simulationScene/database/xdsjk.vue
Normal file
133
src/views/simulationScene/database/xdsjk.vue
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
<template>
|
||||||
|
<page-header-wrapper>
|
||||||
|
<Grid>
|
||||||
|
<a-card class="my-card">
|
||||||
|
<AntQueryTable
|
||||||
|
height="100%"
|
||||||
|
ref="xd-table"
|
||||||
|
:queryConfig="xdTable.queryConfig"
|
||||||
|
:tableConfig="xdTable.tableConfig"
|
||||||
|
:pageConfig="xdTable.pageConfig"
|
||||||
|
:showTool="xdTable.showTool"
|
||||||
|
>
|
||||||
|
<template #toolbar-left>
|
||||||
|
<a-button type="primary" icon="plus" @click="handleOpenAddModal">新增</a-button>
|
||||||
|
</template>
|
||||||
|
<template #tablecell-action="{ record }">
|
||||||
|
<a-button type="text-primary" icon="form" @click="handleOpenEditModal(record)"></a-button>
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
<a-popconfirm
|
||||||
|
title="确定要删除该想定吗?"
|
||||||
|
ok-text="确定"
|
||||||
|
cancel-text="取消"
|
||||||
|
@confirm="handleDelete(record)"
|
||||||
|
>
|
||||||
|
<a-button type="text-primary" icon="delete"></a-button>
|
||||||
|
</a-popconfirm>
|
||||||
|
</template>
|
||||||
|
</AntQueryTable>
|
||||||
|
</a-card>
|
||||||
|
</Grid>
|
||||||
|
<AntFormModal
|
||||||
|
:visible.sync="AEModal.visible"
|
||||||
|
:title="AEModal.title"
|
||||||
|
:formItems="AEModal.formItems"
|
||||||
|
:formRules="AEModal.formRules"
|
||||||
|
:formData="AEModal.formData"
|
||||||
|
:onSubmit="handleSubmitAE"
|
||||||
|
@success="handleSubmitAESuccess"
|
||||||
|
></AntFormModal>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Xdsjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
xdTable: {
|
||||||
|
queryConfig: {
|
||||||
|
items: [{ label: '想定名称', prop: 'name' }],
|
||||||
|
},
|
||||||
|
tableConfig: {
|
||||||
|
query: (params) =>
|
||||||
|
this.$http({
|
||||||
|
url: '/baseData/scenario/list',
|
||||||
|
method: 'get',
|
||||||
|
params: params,
|
||||||
|
}),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '想定名称', align: 'left', dataIndex: 'name', ellipsis: true, width: 'auto' },
|
||||||
|
{ title: '作者', dataIndex: 'author', align: 'left', width: 'auto' },
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
dataIndex: 'createTime',
|
||||||
|
customRender: (t) => t?.replace('T', ' '),
|
||||||
|
align: 'left',
|
||||||
|
width: 'auto',
|
||||||
|
},
|
||||||
|
{ dataIndex: 'action' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: true,
|
||||||
|
showTool: true,
|
||||||
|
},
|
||||||
|
AEModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '新增想定',
|
||||||
|
formItems: [{ label: '想定名称', prop: 'name' }],
|
||||||
|
formRules: {
|
||||||
|
name: [{ required: true, message: '请输入想定名称!', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleOpenAddModal() {
|
||||||
|
this.AEModal.formData = {}
|
||||||
|
this.AEModal.title = '新增想定'
|
||||||
|
this.AEModal.visible = true
|
||||||
|
},
|
||||||
|
async handleOpenEditModal(record) {
|
||||||
|
try {
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/baseData/scenario/${record.id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.AEModal.formData = res.data
|
||||||
|
this.AEModal.title = '编辑想定'
|
||||||
|
this.AEModal.visible = true
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmitAE(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: `/baseData/scenario/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitAESuccess() {
|
||||||
|
this.$refs['xd-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
async handleDelete(record) {
|
||||||
|
try {
|
||||||
|
await this.$http({
|
||||||
|
url: `/baseData/scenario/remove/${record.id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.$message.success('删除想定成功')
|
||||||
|
this.$refs['xd-table'].commitAction('query')
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
this.$message.error('删除想定失败')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
68
src/views/simulationScene/database/yxjlsjk.vue
Normal file
68
src/views/simulationScene/database/yxjlsjk.vue
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
<template>
|
||||||
|
<page-header-wrapper>
|
||||||
|
<Grid>
|
||||||
|
<a-card class="my-card">
|
||||||
|
<AntQueryTable
|
||||||
|
height="100%"
|
||||||
|
ref="xd-table"
|
||||||
|
:queryConfig="yxjlTable.queryConfig"
|
||||||
|
:tableConfig="yxjlTable.tableConfig"
|
||||||
|
:pageConfig="yxjlTable.pageConfig"
|
||||||
|
:showTool="yxjlTable.showTool"
|
||||||
|
>
|
||||||
|
</AntQueryTable>
|
||||||
|
</a-card>
|
||||||
|
</Grid>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Yxjlsjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
yxjlTable: {
|
||||||
|
queryConfig: {
|
||||||
|
items: [{ label: '想定名称', prop: 'name' }],
|
||||||
|
},
|
||||||
|
tableConfig: {
|
||||||
|
query: (params) =>
|
||||||
|
this.$http({
|
||||||
|
url: '/scenarioHistory/list',
|
||||||
|
method: 'get',
|
||||||
|
params: params,
|
||||||
|
}),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '#', align: 'center', dataIndex: 'id', width: 80 },
|
||||||
|
{ title: '想定名称', align: 'left', dataIndex: 'name', ellipsis: true, width: 'auto' },
|
||||||
|
{ title: '作者', dataIndex: 'author', align: 'left', width: 'auto' },
|
||||||
|
{
|
||||||
|
title: '运行状态',
|
||||||
|
dataIndex: 'finalStatus',
|
||||||
|
customRender: (t) => ({ 1: '中止', 2: '推演结束' }[t]),
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '开始时间',
|
||||||
|
dataIndex: 'scenarioStartRunTime',
|
||||||
|
customRender: (t) => t?.replace('T', ' '),
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '结束时间',
|
||||||
|
dataIndex: 'scenarioEndRunTime',
|
||||||
|
customRender: (t) => t?.replace('T', ' '),
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: true,
|
||||||
|
showTool: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
507
src/views/simulationScene/database/zzllsjk.vue
Normal file
507
src/views/simulationScene/database/zzllsjk.vue
Normal file
|
|
@ -0,0 +1,507 @@
|
||||||
|
<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 / 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">
|
||||||
|
<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>
|
||||||
|
</Flex>
|
||||||
|
</template>
|
||||||
|
</a-dropdown>
|
||||||
|
</template>
|
||||||
|
</a-tree>
|
||||||
|
</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="handleOpenAddZzryModal">新增</a-button>
|
||||||
|
<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">
|
||||||
|
<template #tablecell-action="{ record }">
|
||||||
|
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzryModal(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="handleOpenAddZzzbModal">新增</a-button>
|
||||||
|
<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">
|
||||||
|
<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="zzwzModal.visible"
|
||||||
|
:title="zzwzModal.title"
|
||||||
|
:formItems="zzwzFormItems"
|
||||||
|
:formRules="zzwzModal.formRules" :formData="zzwzModal.formData" :onSubmit="handleSubmitZzwz"
|
||||||
|
@success="handleSubmitZzwzSuccess"></AntFormModal>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Zzllsjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
layoutRight: 'auto',
|
||||||
|
zzjg: {
|
||||||
|
treeData: [],
|
||||||
|
selectedKeys: [],
|
||||||
|
expandedKeys: [],
|
||||||
|
},
|
||||||
|
zzjgModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
mode: '',
|
||||||
|
formItems: [
|
||||||
|
{
|
||||||
|
label: '上级组织',
|
||||||
|
prop: 'parentId',
|
||||||
|
component: 'AntOriginTreeSelect',
|
||||||
|
options: {
|
||||||
|
dataSource: () =>
|
||||||
|
this.$http({
|
||||||
|
url: '/tree/organization',
|
||||||
|
method: 'get',
|
||||||
|
params: { unittype: 1 },
|
||||||
|
}).then((res) => ({ data: [{ key: 0, title: '根组织' }].concat(res.data) })),
|
||||||
|
valueKey: 'key',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '标识编码',
|
||||||
|
prop: 'codeName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '组织名称',
|
||||||
|
prop: 'name',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
formRules: {
|
||||||
|
codeName: [{ required: true, message: '请输入标识编码!', trigger: 'blur' }],
|
||||||
|
name: [{ required: true, message: '请输入组织名称!', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
|
||||||
|
zzry: {
|
||||||
|
queryConfig: false,
|
||||||
|
tableConfig: {
|
||||||
|
table: {},
|
||||||
|
immediate: false,
|
||||||
|
query: () =>
|
||||||
|
this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/staff/${this.zzjg.selectedKeys[0]}`,
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '岗位', dataIndex: 'name', width: 'auto', minWidth: 150 },
|
||||||
|
{ title: '岗位数量', dataIndex: 'number', type: 'number', width: 'auto', minWidth: 150 },
|
||||||
|
{ dataIndex: 'action' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: false,
|
||||||
|
showTool: false,
|
||||||
|
},
|
||||||
|
zzryModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
mode: '',
|
||||||
|
formItems: [
|
||||||
|
{
|
||||||
|
label: '岗位名称',
|
||||||
|
prop: 'typeId',
|
||||||
|
component: 'AntOriginSelect',
|
||||||
|
options: {
|
||||||
|
dataSource: () =>
|
||||||
|
this.$http({
|
||||||
|
url: '/unit/getAll',
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
labelKey: 'name',
|
||||||
|
readonly: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ label: '岗位数量', prop: 'number' },
|
||||||
|
],
|
||||||
|
formRules: {
|
||||||
|
typeId: [{ required: true, message: '请选择岗位!', trigger: 'change' }],
|
||||||
|
number: [{ required: true, message: '请输入岗位数量!', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
formData: {},
|
||||||
|
},
|
||||||
|
|
||||||
|
zzzb: {
|
||||||
|
queryConfig: false,
|
||||||
|
tableConfig: {
|
||||||
|
table: {},
|
||||||
|
immediate: false,
|
||||||
|
query: () =>
|
||||||
|
this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/weapon/${this.zzjg.selectedKeys[0]}`,
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '装备名称', dataIndex: 'name', width: 'auto', minWidth: 150 },
|
||||||
|
{ title: '装备数量', dataIndex: 'number', type: 'number', width: 'auto', minWidth: 150 },
|
||||||
|
{ dataIndex: 'action' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pageConfig: false,
|
||||||
|
showTool: false,
|
||||||
|
},
|
||||||
|
zzzbModal: {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
mode: '',
|
||||||
|
formItems: [
|
||||||
|
{
|
||||||
|
label: '装备名称',
|
||||||
|
prop: 'weaponId',
|
||||||
|
component: 'AntOriginTreeSelect',
|
||||||
|
options: {
|
||||||
|
dataSource: () =>
|
||||||
|
this.$http({
|
||||||
|
url: '/tree/armament',
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
readonly: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ label: '装备数量', prop: 'number' },
|
||||||
|
],
|
||||||
|
formRules: {
|
||||||
|
weaponId: [{ required: true, message: '请选择装备!', trigger: 'change' }],
|
||||||
|
number: [{ required: true, message: '请输入装备数量!', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
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, 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: '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()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getZzTree() {
|
||||||
|
try {
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/tree/organization`,
|
||||||
|
method: 'get',
|
||||||
|
params: { unittype: 1 },
|
||||||
|
})
|
||||||
|
this.zzjg.treeData = res.data
|
||||||
|
this.zzjg.selectedKeys = [this.zzjg.treeData[0].key]
|
||||||
|
this.handleChangeZzjgSelected()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChangeZzjgSelected() {
|
||||||
|
this.$refs['zzry-table'].commitAction('reload')
|
||||||
|
this.$refs['zzzb-table'].commitAction('reload')
|
||||||
|
this.$refs['zzwz-table'].commitAction('reload')
|
||||||
|
},
|
||||||
|
handleOpenAddZzjgModal(parentId) {
|
||||||
|
this.zzjgModal.title = '新建作战力量'
|
||||||
|
this.zzjgModal.mode = 'add'
|
||||||
|
this.zzjgModal.formData = { unittype: 1, parentId }
|
||||||
|
this.zzjgModal.visible = true
|
||||||
|
},
|
||||||
|
async handleOpenEditZzjgModal(id) {
|
||||||
|
try {
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/${id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.zzjgModal.title = '编辑作战力量'
|
||||||
|
this.zzjgModal.mode = 'edit'
|
||||||
|
this.zzjgModal.formData = res.data
|
||||||
|
this.zzjgModal.visible = true
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
this.$message.error('未知错误,请重试')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmitZzjg(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitZzjgSuccess() {
|
||||||
|
this.getZzTree()
|
||||||
|
},
|
||||||
|
async handleDeleteZzjg(id, title) {
|
||||||
|
try {
|
||||||
|
await this.$confirm({ content: `确定删除作战力量-${title}?` })
|
||||||
|
await this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/remove/${id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.getZzTree()
|
||||||
|
} catch (error) { }
|
||||||
|
},
|
||||||
|
|
||||||
|
handleOpenAddZzryModal() {
|
||||||
|
this.zzryModal.title = '新建组织人员'
|
||||||
|
this.zzryModal.mode = 'add'
|
||||||
|
this.zzryModal.formData = { parentId: this.zzjg.selectedKeys[0] }
|
||||||
|
this.zzryModal.formItems[0].options.readonly = false
|
||||||
|
this.zzryModal.visible = true
|
||||||
|
},
|
||||||
|
handleOpenEditZzryModal(record) {
|
||||||
|
this.zzryModal.title = `编辑组织人员`
|
||||||
|
this.zzryModal.mode = 'edit'
|
||||||
|
this.zzryModal.formData = { ...record }
|
||||||
|
this.zzryModal.formItems[0].options.readonly = true
|
||||||
|
this.zzryModal.visible = true
|
||||||
|
},
|
||||||
|
handleSubmitZzry(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/staff/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitZzrySuccess() {
|
||||||
|
this.$refs['zzry-table'].commitAction('query')
|
||||||
|
},
|
||||||
|
|
||||||
|
handleOpenAddZzzbModal() {
|
||||||
|
this.zzzbModal.title = '新建组织装备'
|
||||||
|
this.zzzbModal.mode = 'add'
|
||||||
|
this.zzzbModal.formData = { parentId: this.zzjg.selectedKeys[0] }
|
||||||
|
this.zzzbModal.visible = true
|
||||||
|
},
|
||||||
|
handleOpenEditZzzbModal(record) {
|
||||||
|
this.zzzbModal.title = `编辑组织装备`
|
||||||
|
this.zzzbModal.mode = 'edit'
|
||||||
|
this.zzzbModal.formData = { ...record }
|
||||||
|
this.zzzbModal.visible = true
|
||||||
|
},
|
||||||
|
handleSubmitZzzb(formData) {
|
||||||
|
return this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/weapon/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.contextmenu-zz {
|
||||||
|
padding: 5px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 0 5px #aaaaaa;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
267
src/views/simulationScene/database/zzsjk.vue
Normal file
267
src/views/simulationScene/database/zzsjk.vue
Normal file
|
|
@ -0,0 +1,267 @@
|
||||||
|
<template>
|
||||||
|
<page-header-wrapper>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline">
|
||||||
|
<a-row :gutter="48">
|
||||||
|
<a-col :xl="8" :lg="8">
|
||||||
|
<span class="table-page-search-submitButtons">
|
||||||
|
<a-button type="primary" @click="getList">查询</a-button>
|
||||||
|
<a-button style="margin-left: 8px" @click="resetList">重置</a-button>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="8" :lg="8"> </a-col>
|
||||||
|
<a-col :xl="8" :lg="8">
|
||||||
|
<a-button type="primary" icon="plus" style="float: right" @click="handleAdd">新建</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<a-table
|
||||||
|
bordered
|
||||||
|
rowKey="key"
|
||||||
|
size="small"
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="loadData"
|
||||||
|
:pagination="false"
|
||||||
|
:loading="loadingTable"
|
||||||
|
>
|
||||||
|
<span slot="action" slot-scope="text, record">
|
||||||
|
<a @click="handleEdit(record)"> <a-icon type="form" /></a>
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
|
||||||
|
<a-popconfirm title="确定要删除该组织吗?" ok-text="确定" cancel-text="取消" @confirm="handleDelete(record)">
|
||||||
|
<a href="javascript:;"><a-icon type="delete" /></a>
|
||||||
|
</a-popconfirm>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</a-card>
|
||||||
|
|
||||||
|
<h-modal
|
||||||
|
:title="AEModal.title"
|
||||||
|
:width="640"
|
||||||
|
:visible="AEModal.visible"
|
||||||
|
:destroyOnClose="true"
|
||||||
|
@cancel="() => this.handleClose()"
|
||||||
|
@ok="() => this.handleOk()"
|
||||||
|
switch-fullscreen
|
||||||
|
:fullscreen.sync="AEModal.fullscreen"
|
||||||
|
>
|
||||||
|
<a-spin :spinning="AEModal.spinning">
|
||||||
|
<a-form-model
|
||||||
|
ref="form"
|
||||||
|
:model="AEModal.form"
|
||||||
|
:rules="AEModal.rules"
|
||||||
|
:label-col="AEModal.labelCol"
|
||||||
|
:wrapper-col="AEModal.wrapperCol"
|
||||||
|
>
|
||||||
|
<a-form-model-item v-for="item in AEModal.formItems.concat(unittypeFormItem)" :key="item.prop" v-bind="item">
|
||||||
|
<span v-if="item.customRender">{{ item.customRender(AEModal.form[item.prop]) }}</span>
|
||||||
|
<component
|
||||||
|
v-else
|
||||||
|
:is="item.component || 'a-input'"
|
||||||
|
v-model="AEModal.form[item.prop]"
|
||||||
|
v-bind="item.options"
|
||||||
|
v-on="item.listeners"
|
||||||
|
/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-form-model>
|
||||||
|
</a-spin>
|
||||||
|
</h-modal>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Zzsjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
queryParam: {}, // 查询参数
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '#',
|
||||||
|
dataIndex: 'key',
|
||||||
|
align: 'left',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '组织名称',
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'title',
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '组织类型',
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'unittype',
|
||||||
|
customRender: (v, record) => {
|
||||||
|
return { 1: '作战力量', 2: '保障力量' }[record.data.unittype]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
width: 140,
|
||||||
|
dataIndex: 'action',
|
||||||
|
align: 'center',
|
||||||
|
scopedSlots: { customRender: 'action' },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
loadData: [], // 加载数据方法 必须为 Promise 对象
|
||||||
|
loadingTable: false,
|
||||||
|
|
||||||
|
AEModal: {
|
||||||
|
title: '',
|
||||||
|
visible: false,
|
||||||
|
editStatus: false,
|
||||||
|
fullscreen: false,
|
||||||
|
spinning: false,
|
||||||
|
form: {},
|
||||||
|
formItems: [
|
||||||
|
{
|
||||||
|
label: '上级组织',
|
||||||
|
prop: 'parentId',
|
||||||
|
component: 'AntOriginTreeSelect',
|
||||||
|
options: {
|
||||||
|
dataSource: () =>
|
||||||
|
this.$http({
|
||||||
|
url: '/tree/organization',
|
||||||
|
method: 'get',
|
||||||
|
}).then((res) => ({ data: [{ key: 0, title: '根组织' }].concat(res.data) })),
|
||||||
|
valueKey: 'key',
|
||||||
|
},
|
||||||
|
listeners: {
|
||||||
|
change: (v, t, record) => {
|
||||||
|
if (v === 0) {
|
||||||
|
this.$set(this.AEModal.form, 'unittype', '')
|
||||||
|
} else {
|
||||||
|
this.$set(this.AEModal.form, 'unittype', record.data.unittype)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '标识编码',
|
||||||
|
prop: 'codeName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '组织名称',
|
||||||
|
prop: 'name',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
codeName: [{ required: true, message: '请输入标识编码!', trigger: 'blur' }],
|
||||||
|
name: [{ required: true, message: '请输入组织名称!', trigger: 'blur' }],
|
||||||
|
unittype: [{ required: true, message: '请选择组织类型!', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
labelCol: { xs: { span: 24 }, sm: { span: 7 } },
|
||||||
|
wrapperCol: { xs: { span: 24 }, sm: { span: 13 } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
unittypeFormItem() {
|
||||||
|
return this.AEModal.form.parentId === 0
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
label: '组织类型',
|
||||||
|
prop: 'unittype',
|
||||||
|
component: 'a-radio-group',
|
||||||
|
options: {
|
||||||
|
options: [
|
||||||
|
{ label: '作战力量', value: 1 },
|
||||||
|
{ label: '保障力量', value: 2 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: [
|
||||||
|
{
|
||||||
|
label: '组织类型',
|
||||||
|
prop: 'unittype',
|
||||||
|
customRender: (v) => ({ 1: '作战力量', 2: '保障力量' }[v]),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetList() {
|
||||||
|
this.queryParam = {}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
async getList(parameter = {}) {
|
||||||
|
try {
|
||||||
|
this.loadingTable = true
|
||||||
|
const res = await this.$http({
|
||||||
|
url: '/tree/organization',
|
||||||
|
method: 'get',
|
||||||
|
params: { ...parameter, ...this.queryParam },
|
||||||
|
})
|
||||||
|
this.loadData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
} finally {
|
||||||
|
this.loadingTable = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.AEModal.form = { parentId: 0 }
|
||||||
|
this.AEModal.title = '添加组织'
|
||||||
|
this.AEModal.editStatus = false
|
||||||
|
this.AEModal.visible = true
|
||||||
|
},
|
||||||
|
async handleEdit(record) {
|
||||||
|
try {
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/${record.key}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.AEModal.form = res.data
|
||||||
|
this.AEModal.title = '编辑组织'
|
||||||
|
this.AEModal.editStatus = true
|
||||||
|
this.AEModal.visible = true
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
this.$message.error('未知错误,请重试')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.AEModal.visible = false
|
||||||
|
this.AEModal.form = {}
|
||||||
|
},
|
||||||
|
async handleOk() {
|
||||||
|
try {
|
||||||
|
await this.$refs.form.validate()
|
||||||
|
const params = { ...this.AEModal.form }
|
||||||
|
await this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/save`,
|
||||||
|
method: 'post',
|
||||||
|
data: params,
|
||||||
|
})
|
||||||
|
this.$message.success(`${this.AEModal.title}成功`)
|
||||||
|
this.getList()
|
||||||
|
this.handleClose()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleDelete(record) {
|
||||||
|
try {
|
||||||
|
await this.$http({
|
||||||
|
url: `/baseData/fightPowerHierarchy/remove/${record.key}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.$message.success('删除组织成功')
|
||||||
|
this.getList()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
this.$message.error('删除组织失败')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
Loading…
Reference in New Issue
Block a user