修改格式化错误

This commit is contained in:
wangchengming 2025-09-14 16:04:41 +08:00
parent b5bc55b68d
commit ab575b6592
4 changed files with 109 additions and 45 deletions

View File

@ -5,7 +5,10 @@
<template #extra> <template #extra>
<a-button type="primary" icon="plus" shape="circle" title="新增" @click="handleOpenAddZzjgModal()"></a-button> <a-button type="primary" icon="plus" shape="circle" title="新增" @click="handleOpenAddZzjgModal()"></a-button>
</template> </template>
<a-tree :treeData="zzjg.treeData" :selectedKeys.sync="zzjg.selectedKeys" :expandedKeys.sync="zzjg.expandedKeys" <a-tree
:treeData="zzjg.treeData"
:selectedKeys.sync="zzjg.selectedKeys"
:expandedKeys.sync="zzjg.expandedKeys"
@select="handleChangeZzjgSelected"> @select="handleChangeZzjgSelected">
<template #title="{ key: id, title }"> <template #title="{ key: id, title }">
<a-dropdown :trigger="['contextmenu']"> <a-dropdown :trigger="['contextmenu']">
@ -24,11 +27,18 @@
<a-card title="组织人员" class="my-card my-card-has-title" :bordered="false"> <a-card title="组织人员" class="my-card my-card-has-title" :bordered="false">
<template #extra> <template #extra>
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzryModal">新增</a-button> <a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzryModal">新增</a-button>
<a-icon v-if="layoutRight === 'zzry'" type="fullscreen-exit" style="font-size: 32px" <a-icon
v-if="layoutRight === 'zzry'"
type="fullscreen-exit"
style="font-size: 32px"
@click="layoutRight = 'auto'" /> @click="layoutRight = 'auto'" />
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzry'" /> <a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzry'" />
</template> </template>
<AntQueryTable ref="zzry-table" height="100%" :queryConfig="zzry.queryConfig" :tableConfig="zzry.tableConfig" <AntQueryTable
ref="zzry-table"
height="100%"
:queryConfig="zzry.queryConfig"
:tableConfig="zzry.tableConfig"
:pageConfig="zzry.pageConfig" :showTool="zzry.showTool"> :pageConfig="zzry.pageConfig" :showTool="zzry.showTool">
<template #tablecell-action="{ record }"> <template #tablecell-action="{ record }">
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzryModal(record)"></a-button> <a-button type="text-primary" icon="edit" @click="handleOpenEditZzryModal(record)"></a-button>
@ -38,11 +48,17 @@
<a-card title="组织装备" class="my-card my-card-has-title" :bordered="false"> <a-card title="组织装备" class="my-card my-card-has-title" :bordered="false">
<template #extra> <template #extra>
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzzbModal">新增</a-button> <a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzzbModal">新增</a-button>
<a-icon v-if="layoutRight === 'zzzb'" type="fullscreen-exit" style="font-size: 32px" <a-icon
v-if="layoutRight === 'zzzb'"
type="fullscreen-exit"
style="font-size: 32px"
@click="layoutRight = 'auto'" /> @click="layoutRight = 'auto'" />
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzzb'" /> <a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzzb'" />
</template> </template>
<AntQueryTable ref="zzzb-table" height="100%" :queryConfig="zzzb.queryConfig" :tableConfig="zzzb.tableConfig" <AntQueryTable
ref="zzzb-table" height="100%"
:queryConfig="zzzb.queryConfig"
:tableConfig="zzzb.tableConfig"
:pageConfig="zzzb.pageConfig" :showTool="zzzb.showTool"> :pageConfig="zzzb.pageConfig" :showTool="zzzb.showTool">
<template #tablecell-action="{ record }"> <template #tablecell-action="{ record }">
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzzbModal(record)"></a-button> <a-button type="text-primary" icon="edit" @click="handleOpenEditZzzbModal(record)"></a-button>
@ -53,11 +69,18 @@
<a-card title="组织物资" class="my-card my-card-has-title" :bordered="false"> <a-card title="组织物资" class="my-card my-card-has-title" :bordered="false">
<template #extra> <template #extra>
<a-button type="primary" style="margin-right: 20px" @click="handleOpenAddZzwzModal">新增</a-button> <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" <a-icon
v-if="layoutRight === 'zzwz'"
type="fullscreen-exit"
style="font-size: 32px"
@click="layoutRight = 'auto'" /> @click="layoutRight = 'auto'" />
<a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzwz'" /> <a-icon v-else type="fullscreen" style="font-size: 32px" @click="layoutRight = 'zzwz'" />
</template> </template>
<AntQueryTable ref="zzwz-table" height="100%" :queryConfig="zzwz.queryConfig" :tableConfig="zzwz.tableConfig" <AntQueryTable
ref="zzwz-table"
height="100%"
:queryConfig="zzwz.queryConfig"
:tableConfig="zzwz.tableConfig"
:pageConfig="zzwz.pageConfig" :showTool="zzwz.showTool"> :pageConfig="zzwz.pageConfig" :showTool="zzwz.showTool">
<template #tablecell-action="{ record }"> <template #tablecell-action="{ record }">
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzwzModal(record)"></a-button> <a-button type="text-primary" icon="edit" @click="handleOpenEditZzwzModal(record)"></a-button>
@ -65,17 +88,29 @@
</AntQueryTable> </AntQueryTable>
</a-card> </a-card>
</Grid> </Grid>
<AntFormModal :visible.sync="zzjgModal.visible" :title="zzjgModal.title" :formItems="zzjgModal.formItems" <AntFormModal
:visible.sync="zzjgModal.visible"
:title="zzjgModal.title"
:formItems="zzjgModal.formItems"
:formRules="zzjgModal.formRules" :formData="zzjgModal.formData" :onSubmit="handleSubmitZzjg" :formRules="zzjgModal.formRules" :formData="zzjgModal.formData" :onSubmit="handleSubmitZzjg"
@success="handleSubmitZzjgSuccess"></AntFormModal> @success="handleSubmitZzjgSuccess"></AntFormModal>
<AntFormModal :visible.sync="zzryModal.visible" :title="zzryModal.title" :formItems="zzryModal.formItems" <AntFormModal
:visible.sync="zzryModal.visible"
:title="zzryModal.title"
:formItems="zzryModal.formItems"
:formRules="zzryModal.formRules" :formData="zzryModal.formData" :onSubmit="handleSubmitZzry" :formRules="zzryModal.formRules" :formData="zzryModal.formData" :onSubmit="handleSubmitZzry"
@success="handleSubmitZzrySuccess"></AntFormModal> @success="handleSubmitZzrySuccess"></AntFormModal>
<AntFormModal :visible.sync="zzzbModal.visible" :title="zzzbModal.title" :formItems="zzzbFormItems" <AntFormModal
:visible.sync="zzzbModal.visible"
:title="zzzbModal.title"
:formItems="zzzbFormItems"
:formRules="zzzbModal.formRules" :formData="zzzbModal.formData" :onSubmit="handleSubmitZzzb" :formRules="zzzbModal.formRules" :formData="zzzbModal.formData" :onSubmit="handleSubmitZzzb"
@success="handleSubmitZzzbSuccess"></AntFormModal> @success="handleSubmitZzzbSuccess"></AntFormModal>
<!-- 组织物资模态框 --> <!-- 组织物资模态框 -->
<AntFormModal :visible.sync="zzwzModal.visible" :title="zzwzModal.title" :formItems="zzwzFormItems" <AntFormModal
:visible.sync="zzwzModal.visible"
:title="zzwzModal.title"
:formItems="zzwzFormItems"
:formRules="zzwzModal.formRules" :formData="zzwzModal.formData" :onSubmit="handleSubmitZzwz" :formRules="zzwzModal.formRules" :formData="zzwzModal.formData" :onSubmit="handleSubmitZzwz"
@success="handleSubmitZzwzSuccess"></AntFormModal> @success="handleSubmitZzwzSuccess"></AntFormModal>
</page-header-wrapper> </page-header-wrapper>

View File

@ -49,21 +49,21 @@
</ModuleWrapper> </ModuleWrapper>
<ModuleWrapper height="55%"> <ModuleWrapper height="55%">
<template #title> <template #title>
<a-radio-group v-model="qd.qdlx" button-style="solid"> <a-radio-group v-model="qd.qdlx" button-style="solid">
<a-radio-button value="xqqd">需求清单</a-radio-button> <a-radio-button value="xqqd">需求清单</a-radio-button>
<a-radio-button value="bzqd">保障清单</a-radio-button> <a-radio-button value="bzqd">保障清单</a-radio-button>
</a-radio-group> </a-radio-group>
</template> </template>
<div class="normal" style="padding: 5px"> <div class="normal" style="padding: 5px">
<a-table <a-table
class="simulation-table-plain" class="simulation-table-plain"
rowKey="id" rowKey="id"
:columns="qd.qdColumns" :columns="qd.qdColumns"
:dataSource="qd.qdList" :dataSource="qd.qdList"
:pagination="false" :pagination="false"
:bordered="true" :bordered="true"
></a-table> ></a-table>
</div> </div>
</ModuleWrapper> </ModuleWrapper>
</div> </div>
<div <div

View File

@ -8,12 +8,18 @@
<a-button type="text-primary" icon="edit" @click="handleOpenEditActionModal"></a-button> <a-button type="text-primary" icon="edit" @click="handleOpenEditActionModal"></a-button>
<a-button type="text-primary" icon="delete" @click="handleDeleteAction"></a-button> <a-button type="text-primary" icon="delete" @click="handleDeleteAction"></a-button>
</div> </div>
<a-modal v-model="actionModal.visible" :title="actionModal.title" :maskClosable="false" :destroyOnClose="true" <a-modal
v-model="actionModal.visible"
:title="actionModal.title" :maskClosable="false" :destroyOnClose="true"
@ok="handleSubmilAction"> @ok="handleSubmilAction">
<a-form-model :model="actionModal.formData" layout="horizontal" :labelCol="{ span: 6 }" <a-form-model
:model="actionModal.formData"
layout="horizontal" :labelCol="{ span: 6 }"
:wrapperCol="{ span: 15 }"> :wrapperCol="{ span: 15 }">
<a-form-model-item v-for="item in actionModal.formItems" :key="item.prop" v-bind="item"> <a-form-model-item v-for="item in actionModal.formItems" :key="item.prop" v-bind="item">
<component :is="item.component || 'a-input'" v-model="actionModal.formData[item.prop]" <component
:is="item.component || 'a-input'"
v-model="actionModal.formData[item.prop]"
v-bind="item.options" /> v-bind="item.options" />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
@ -99,8 +105,7 @@ export default {
}, },
watch: { watch: {
resourceid: { resourceid: {
handler(newValue, oldValue) { handler(newValue, oldValue) {
console.log('用户信息发生了变化:', newValue);
this.handleGetTaskList() this.handleGetTaskList()
}, },
deep: true // deep: true //

View File

@ -7,20 +7,28 @@
<a-button type="text-primary" icon="sync" style="font-size: 20px" @click="getZzbzllTreeData()"></a-button> <a-button type="text-primary" icon="sync" style="font-size: 20px" @click="getZzbzllTreeData()"></a-button>
</template> </template>
<div class="normal" style="padding: 5px; overflow-y: auto"> <div class="normal" style="padding: 5px; overflow-y: auto">
<a-tree class="simulation-tree" :treeData="zzbzll.treeData" :selectedKeys.sync="zzbzll.selectedKeys" <a-tree
class="simulation-tree"
:treeData="zzbzll.treeData" :selectedKeys.sync="zzbzll.selectedKeys"
:replaceFields="{ children: 'children', title: 'title', key: 'id' }" @select="handleSelectZzbzll"> :replaceFields="{ children: 'children', title: 'title', key: 'id' }" @select="handleSelectZzbzll">
<template #title="{ id, dataRef }"> <template #title="{ id, dataRef }">
<a-dropdown :trigger="['contextmenu']"> <a-dropdown :trigger="['contextmenu']">
<span>{{ dataRef.resourceName || dataRef.title }}</span> <span>{{ dataRef.resourceName || dataRef.title }}</span>
<template #overlay> <template #overlay>
<Flex> <Flex>
<a-button type="text-primary" icon="edit" title="修改名称" <a-button
type="text-primary"
icon="edit" title="修改名称"
@click="handleOpenEditZzbzllModal(id, dataRef)"></a-button> @click="handleOpenEditZzbzllModal(id, dataRef)"></a-button>
<AntFormModal :visible.sync="zzbzllModal.visible" :title="zzbzllModal.title" <AntFormModal
:visible.sync="zzbzllModal.visible"
:title="zzbzllModal.title"
:formItems="zzbzllModal.formItems" :formRules="zzbzllModal.formRules" :formItems="zzbzllModal.formItems" :formRules="zzbzllModal.formRules"
:formData="zzbzllModal.formData" :onSubmit="handleSubmitZzbzll" :formData="zzbzllModal.formData" :onSubmit="handleSubmitZzbzll"
@success="handleSubmitZzbzllSuccess"></AntFormModal> @success="handleSubmitZzbzllSuccess"></AntFormModal>
<a-button type="text-danger" icon="delete" title="删除" <a-button
type="text-danger"
icon="delete" title="删除"
@click="handleDeleteZzbzll(id, dataRef)"></a-button> @click="handleDeleteZzbzll(id, dataRef)"></a-button>
</Flex> </Flex>
</template> </template>
@ -40,9 +48,13 @@
<template v-if="model.type === 'zbys'"> <template v-if="model.type === 'zbys'">
<a-input-search v-model="model.queryParams.keyword" placeholder="输入关键词搜索..." @search="getZbysListData()" /> <a-input-search v-model="model.queryParams.keyword" placeholder="输入关键词搜索..." @search="getZbysListData()" />
<Flex> <Flex>
<AntOriginSelect v-model="model.queryParams.force" :dataSource="() => ({ data: model.forceOptions })" <AntOriginSelect
v-model="model.queryParams.force"
:dataSource="() => ({ data: model.forceOptions })"
width="100px" :allowClear="false" /> width="100px" :allowClear="false" />
<AntOriginSelect v-model="model.queryParams.type" :dataSource="() => ({ data: model.typeOptions })" <AntOriginSelect
v-model="model.queryParams.type"
:dataSource="() => ({ data: model.typeOptions })"
class="flex-1" :allowClear="false" @change="getZbysListData()" /> class="flex-1" :allowClear="false" @change="getZbysListData()" />
</Flex> </Flex>
<Flex class="flex-1 scroller-y" fw="w" ac="fs"> <Flex class="flex-1 scroller-y" fw="w" ac="fs">
@ -55,31 +67,40 @@
</Flex> </Flex>
</ModuleWrapper> </ModuleWrapper>
</div> </div>
<div ref="cesium-container" class="cesium-container" id="cesium-container" <div
ref="cesium-container"
class="cesium-container" id="cesium-container"
style="grid-column: 2 / 3; overflow: hidden"> style="grid-column: 2 / 3; overflow: hidden">
</div> </div>
<div> <div>
<ModuleWrapper title="兵力编组" height="30%"> <ModuleWrapper title="兵力编组" height="30%">
<template #extra> <template #extra>
<a-button type="text-primary" icon="plus" @click="handleOpenBlbzModal()"></a-button> <a-button type="text-primary" icon="plus" @click="handleOpenBlbzModal()"></a-button>
<a-modal v-model="blbzModal.visible" <a-modal
v-model="blbzModal.visible"
:title="'兵力编组-' + (blbz.modelData && (blbz.modelData.resourceName || blbz.modelData.title))" width="900px" :title="'兵力编组-' + (blbz.modelData && (blbz.modelData.resourceName || blbz.modelData.title))" width="900px"
:maskClosable="false" :destroyOnClose="true" @ok="handleSubmitBlbz()"> :maskClosable="false" :destroyOnClose="true" @ok="handleSubmitBlbz()">
<Grid :columns="['300px', 1]" :rows="[1, 1]" style="height: 600px"> <Grid :columns="['300px', 1]" :rows="[1, 1]" style="height: 600px">
<ModuleWrapper title="组织机构" style="grid-row: 1 / 3"> <ModuleWrapper title="组织机构" style="grid-row: 1 / 3">
<a-tree class="simulation-tree" :treeData="blbzModal.treeData" :checkable="true" <a-tree
class="simulation-tree"
:treeData="blbzModal.treeData" :checkable="true"
v-model="blbzModal.checkedKeys" :selectedKeys.sync="blbzModal.selectedKeys" v-model="blbzModal.checkedKeys" :selectedKeys.sync="blbzModal.selectedKeys"
@select="() => ($refs['zzry-table'].commitAction('query'), $refs['zzzb-table'].commitAction('query'))"> @select="() => ($refs['zzry-table'].commitAction('query'), $refs['zzzb-table'].commitAction('query'))">
</a-tree> </a-tree>
</ModuleWrapper> </ModuleWrapper>
<ModuleWrapper title="组织人员"> <ModuleWrapper title="组织人员">
<AntQueryTable ref="zzry-table" height="100%" :queryConfig="blbzModal.zzry.queryConfig" <AntQueryTable
ref="zzry-table"
height="100%" :queryConfig="blbzModal.zzry.queryConfig"
:tableConfig="blbzModal.zzry.tableConfig" :pageConfig="blbzModal.zzry.pageConfig" :tableConfig="blbzModal.zzry.tableConfig" :pageConfig="blbzModal.zzry.pageConfig"
:showTool="blbzModal.zzry.showTool"> :showTool="blbzModal.zzry.showTool">
</AntQueryTable> </AntQueryTable>
</ModuleWrapper> </ModuleWrapper>
<ModuleWrapper title="组织机构"> <ModuleWrapper title="组织机构">
<AntQueryTable ref="zzzb-table" height="100%" :queryConfig="blbzModal.zzzb.queryConfig" <AntQueryTable
ref="zzzb-table"
height="100%" :queryConfig="blbzModal.zzzb.queryConfig"
:tableConfig="blbzModal.zzzb.tableConfig" :pageConfig="blbzModal.zzzb.pageConfig" :tableConfig="blbzModal.zzzb.tableConfig" :pageConfig="blbzModal.zzzb.pageConfig"
:showTool="blbzModal.zzzb.showTool"> :showTool="blbzModal.zzzb.showTool">
</AntQueryTable> </AntQueryTable>
@ -88,7 +109,10 @@
</a-modal> </a-modal>
</template> </template>
<div class="normal" style="padding: 5px; overflow-y: auto"> <div class="normal" style="padding: 5px; overflow-y: auto">
<a-tree class="simulation-tree" :treeData="showBlbzCheckedTreeData" :selectable="false" <a-tree
class="simulation-tree"
:treeData="showBlbzCheckedTreeData"
:selectable="false"
:replaceFields="{ children: 'children', title: 'title', key: 'id' }"> :replaceFields="{ children: 'children', title: 'title', key: 'id' }">
</a-tree> </a-tree>
</div> </div>
@ -391,11 +415,11 @@ export default {
} }
}, },
handleSelectZzbzll(selectedKeys, { node }) { handleSelectZzbzll(selectedKeys, { node }) {
console.log('选择信息', node.dataRef) console.log('选择信息', node.dataRef)
this.cesium.setClientByCenter({ longitude: +node.dataRef.lng, latitude: +node.dataRef.lat }) this.cesium.setClientByCenter({ longitude: +node.dataRef.lng, latitude: +node.dataRef.lat })
this.blbz.modelData = node.dataRef this.blbz.modelData = node.dataRef
this.resourceid = node.dataRef.id this.resourceid = node.dataRef.id
this.type = node.dataRef.type this.type = node.dataRef.type
this.getBlbzTreeData() this.getBlbzTreeData()
this.getJcsxData() this.getJcsxData()