保障环境数据库,运行记录数据库
This commit is contained in:
parent
f8cebd6776
commit
059da317fe
|
@ -1,3 +1,4 @@
|
||||||
|
import Vue from 'vue'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import storage from 'store'
|
import storage from 'store'
|
||||||
|
@ -56,6 +57,7 @@ request.interceptors.request.use((config) => {
|
||||||
// response interceptor
|
// response interceptor
|
||||||
request.interceptors.response.use((response) => {
|
request.interceptors.response.use((response) => {
|
||||||
if (response.data && response.data.code && response.data.code > 5000 && response.data.code < 5008) {
|
if (response.data && response.data.code && response.data.code > 5000 && response.data.code < 5008) {
|
||||||
|
Vue.prototype.$message.error(response.data.message || '未知错误,请重试')
|
||||||
return Promise.reject(response.data)
|
return Promise.reject(response.data)
|
||||||
}
|
}
|
||||||
return response.data
|
return response.data
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapActions, mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SimulationSceneCentralControl',
|
name: 'SimulationSceneCentralControl',
|
||||||
|
@ -144,10 +144,12 @@ export default {
|
||||||
systemPathMap: (state) => state.simulation.systemPathMap,
|
systemPathMap: (state) => state.simulation.systemPathMap,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
|
this.getSystemModules()
|
||||||
this.getScenarioList()
|
this.getScenarioList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(['getSystemModules']),
|
||||||
async getScenarioList() {
|
async getScenarioList() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
|
@ -1,9 +1,329 @@
|
||||||
<template>
|
<template>
|
||||||
<div>bzhjsjk</div>
|
<page-header-wrapper>
|
||||||
|
<div v-grid-box="{ columns: ['400px', 1] }">
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<a-list :loading="listLoading" item-layout="horizontal" :data-source="scenarioList">
|
||||||
|
<a-list-item slot="renderItem" slot-scope="item" @click="handleClickScenario(item)">
|
||||||
|
<a-list-item-meta :description="item.author">
|
||||||
|
<span slot="title">{{ item.name }}</span>
|
||||||
|
<a-checkbox slot="avatar" :checked="item.id === queryParam.id"></a-checkbox>
|
||||||
|
</a-list-item-meta>
|
||||||
|
</a-list-item>
|
||||||
|
</a-list>
|
||||||
|
</a-card>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline">
|
||||||
|
<a-row :gutter="48">
|
||||||
|
<a-col :xl="8" :lg="8">
|
||||||
|
<a-radio-group v-model="queryParam.type" button-style="solid" @change="getList()">
|
||||||
|
<a-radio-button value="weather"> 气象环境 </a-radio-button>
|
||||||
|
<a-radio-button value="ebe"> 电磁环境 </a-radio-button>
|
||||||
|
<!-- <a-radio-button value="dl"> 地理环境 </a-radio-button> -->
|
||||||
|
</a-radio-group>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="8" :lg="8">
|
||||||
|
<a-form-item label="区域">
|
||||||
|
<a-input placeholder="请输入" v-model="queryParam.area" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="5" :lg="5">
|
||||||
|
<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="3" :lg="3">
|
||||||
|
<a-button type="primary" icon="plus" style="float: right" @click="handleAdd">新建</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<a-table
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
size="small"
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="loadData"
|
||||||
|
:pagination="paginationProps"
|
||||||
|
:loading="loadingTable"
|
||||||
|
@change="handleTableChange"
|
||||||
|
>
|
||||||
|
<span slot="action" slot-scope="text, record">
|
||||||
|
<a @click="handleEdit(record)"> <a-icon type="form" /></a>
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
|
||||||
|
<a-popconfirm
|
||||||
|
:title="`确定要删除该${typeMapLabel}吗?`"
|
||||||
|
ok-text="确定"
|
||||||
|
cancel-text="取消"
|
||||||
|
@confirm="handleDelete(record)"
|
||||||
|
>
|
||||||
|
<a href="javascript:;"><a-icon type="delete" /></a>
|
||||||
|
</a-popconfirm>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
<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 formItems" :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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {}
|
// 气象、电磁、地形
|
||||||
|
export default {
|
||||||
|
name: 'Bzhjsjk',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
listLoading: false,
|
||||||
|
scenarioList: [],
|
||||||
|
|
||||||
|
queryParam: { id: '', type: 'weather' },
|
||||||
|
weatherColumns: [
|
||||||
|
{ title: '#', dataIndex: 'id' },
|
||||||
|
{ title: '区域', dataIndex: 'area', align: 'left' },
|
||||||
|
{ title: '日期', dataIndex: 'date', align: 'center' },
|
||||||
|
{ title: '天气', dataIndex: 'weather', align: 'center' },
|
||||||
|
{ title: '大气压', dataIndex: 'airPressure', align: 'center' },
|
||||||
|
{ title: '空气质量', dataIndex: 'airQuality', align: 'center' },
|
||||||
|
{ title: '湿度', dataIndex: 'humidity', align: 'center' },
|
||||||
|
{ title: '降水量', dataIndex: 'precipitation', align: 'center' },
|
||||||
|
{ title: '能见度', dataIndex: 'visibility', align: 'center' },
|
||||||
|
{ title: '风向', dataIndex: 'windDirection', align: 'center' },
|
||||||
|
{ title: '风力', dataIndex: 'windPower', align: 'center' },
|
||||||
|
{ title: '风速', dataIndex: 'windSpeed', align: 'center' },
|
||||||
|
{ title: '操作', width: 100, dataIndex: 'action', align: 'center', scopedSlots: { customRender: 'action' } },
|
||||||
|
],
|
||||||
|
ebeColumns: [
|
||||||
|
{ title: '#', dataIndex: 'id' },
|
||||||
|
{ title: '区域', dataIndex: 'area', align: 'left' },
|
||||||
|
{ title: '持续时间', dataIndex: 'duration', align: 'left' },
|
||||||
|
{ title: '环境变化趋势', dataIndex: 'environmentalChangeTrends', align: 'left' },
|
||||||
|
{ title: '环境复杂度', dataIndex: 'environmentalComplexity', align: 'left' },
|
||||||
|
{ title: '磁场强度', dataIndex: 'fieldStrength', align: 'left' },
|
||||||
|
{ title: '频率', dataIndex: 'frequency', align: 'left' },
|
||||||
|
{ title: '频率区间', dataIndex: 'frequencyRang', align: 'left' },
|
||||||
|
{ title: '干扰幅度', dataIndex: 'interferenceAmplitude', align: 'left' },
|
||||||
|
{ title: '干扰源', dataIndex: 'interferenceSource', align: 'left' },
|
||||||
|
{ title: '干扰类型', dataIndex: 'interferenceType', align: 'left' },
|
||||||
|
{ title: '波型', dataIndex: 'waveType', align: 'left' },
|
||||||
|
{ title: '操作', width: 100, dataIndex: 'action', align: 'center', scopedSlots: { customRender: 'action' } },
|
||||||
|
],
|
||||||
|
dlColumns: [
|
||||||
|
{ title: '#', dataIndex: 'id' },
|
||||||
|
{ title: '操作', width: 100, dataIndex: 'action', align: 'center', scopedSlots: { customRender: 'action' } },
|
||||||
|
],
|
||||||
|
loadData: [], // 加载数据方法 必须为 Promise 对象
|
||||||
|
loadingTable: false,
|
||||||
|
|
||||||
|
paginationProps: {
|
||||||
|
defaultPageSize: 10,
|
||||||
|
showSizeChanger: true,
|
||||||
|
showQuickJumper: true,
|
||||||
|
showTotal: (total) => {
|
||||||
|
return `共 ${total} 条`
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize),
|
||||||
|
},
|
||||||
|
|
||||||
|
AEModal: {
|
||||||
|
title: '',
|
||||||
|
visible: false,
|
||||||
|
editStatus: false,
|
||||||
|
fullscreen: false,
|
||||||
|
spinning: false,
|
||||||
|
form: {},
|
||||||
|
weatherFormItems: [
|
||||||
|
{
|
||||||
|
label: '区域',
|
||||||
|
prop: 'area',
|
||||||
|
component: 'AntOriginSelect',
|
||||||
|
options: { dataSource: () => this.$http({ url: `/system/area/getTreeSelect`, method: 'get' }) },
|
||||||
|
},
|
||||||
|
{ label: '日期', prop: 'date', component: 'a-date-picker', options: { 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' },
|
||||||
|
],
|
||||||
|
ebeFormItems: [
|
||||||
|
{ label: '区域', prop: 'area' },
|
||||||
|
{ 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' },
|
||||||
|
],
|
||||||
|
dlFormItems: [],
|
||||||
|
rules: {
|
||||||
|
name: [{ required: true, message: '请输入想定名称!', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
labelCol: { xs: { span: 24 }, sm: { span: 7 } },
|
||||||
|
wrapperCol: { xs: { span: 24 }, sm: { span: 13 } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
columns() {
|
||||||
|
return this[`${this.queryParam.type}Columns`]
|
||||||
|
},
|
||||||
|
formItems() {
|
||||||
|
return this.AEModal[`${this.queryParam.type}FormItems`]
|
||||||
|
},
|
||||||
|
typeMapLabel() {
|
||||||
|
return {
|
||||||
|
weather: '气象环境',
|
||||||
|
ebe: '电磁环境',
|
||||||
|
dl: '地理环境',
|
||||||
|
}[this.queryParam.type]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getScenarioList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getScenarioList() {
|
||||||
|
try {
|
||||||
|
this.listLoading = true
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/baseData/scenario/all`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.scenarioList = res.data
|
||||||
|
this.queryParam.id = this.scenarioList[0].id
|
||||||
|
this.getList()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
} finally {
|
||||||
|
this.listLoading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleClickScenario(item) {
|
||||||
|
this.queryParam.id = item.id
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
resetList() {
|
||||||
|
this.queryParam.area = ''
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
async getList(parameter = {}) {
|
||||||
|
try {
|
||||||
|
this.loadingTable = true
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/environment/${this.queryParam.type}/list`,
|
||||||
|
method: 'get',
|
||||||
|
params: { ...parameter, ...this.queryParam },
|
||||||
|
})
|
||||||
|
this.loadData = res.data.data
|
||||||
|
this.paginationProps.total = res.data.totalCount
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
} finally {
|
||||||
|
this.loadingTable = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleTableChange(pagination) {
|
||||||
|
const parameter = {}
|
||||||
|
parameter.pageSize = pagination.pageSize
|
||||||
|
parameter.pageNum = pagination.current
|
||||||
|
this.getList(parameter)
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.AEModal.form = {}
|
||||||
|
this.AEModal.title = `添加${this.typeMapLabel}`
|
||||||
|
this.AEModal.editStatus = false
|
||||||
|
this.AEModal.visible = true
|
||||||
|
},
|
||||||
|
async handleEdit(record) {
|
||||||
|
try {
|
||||||
|
const res = await this.$http({
|
||||||
|
url: `/environment/${this.queryParam.type}/${record.id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.AEModal.form = res.data
|
||||||
|
this.AEModal.title = `编辑${this.typeMapLabel}`
|
||||||
|
this.AEModal.editStatus = true
|
||||||
|
this.AEModal.visible = true
|
||||||
|
} catch (error) {
|
||||||
|
console.log(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: `/environment/${this.queryParam.type}/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: `/environment/${this.queryParam.type}/remove/${record.id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.$message.success(`删除${this.typeMapLabel}成功`)
|
||||||
|
this.getList()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
this.$message.error(`删除${this.typeMapLabel}失败`)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
|
|
@ -229,7 +229,7 @@ export default {
|
||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
this.getZzTree()
|
this.getZzTree()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -299,7 +299,6 @@ export default {
|
||||||
this.handleClose()
|
this.handleClose()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
this.$message.error(error.message || '未知错误,请重试')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async handleDelete(record) {
|
async handleDelete(record) {
|
||||||
|
|
|
@ -162,7 +162,7 @@ export default {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
this.getScenarioList()
|
this.getScenarioList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -187,7 +187,6 @@ export default {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
resetList() {
|
resetList() {
|
||||||
this.queryParam = {}
|
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
async getList(parameter = {}) {
|
async getList(parameter = {}) {
|
||||||
|
|
|
@ -137,7 +137,7 @@ export default {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
this.getScenarioList()
|
this.getScenarioList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -162,7 +162,6 @@ export default {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
resetList() {
|
resetList() {
|
||||||
this.queryParam = {}
|
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
async getList(parameter = {}) {
|
async getList(parameter = {}) {
|
||||||
|
|
|
@ -1,264 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<page-header-wrapper>
|
<div>txsjk</div>
|
||||||
<div v-grid-box="{ columns: ['400px', 1] }">
|
|
||||||
<a-card :bordered="false">
|
|
||||||
<a-list :loading="listLoading" item-layout="horizontal" :data-source="scenarioList">
|
|
||||||
<a-list-item slot="renderItem" slot-scope="item" @click="handleClickScenario(item)">
|
|
||||||
<a-list-item-meta :description="item.author">
|
|
||||||
<span slot="title">{{ item.name }}</span>
|
|
||||||
<a-checkbox slot="avatar" :checked="item.id === queryParam.id"></a-checkbox>
|
|
||||||
</a-list-item-meta>
|
|
||||||
</a-list-item>
|
|
||||||
</a-list>
|
|
||||||
</a-card>
|
|
||||||
<a-card :bordered="false">
|
|
||||||
<div class="table-page-search-wrapper">
|
|
||||||
<a-form layout="inline">
|
|
||||||
<a-row :gutter="48">
|
|
||||||
<!-- <a-col :xl="8" :lg="8">
|
|
||||||
<a-form-item label="想定名称">
|
|
||||||
<a-input placeholder="请输入" v-model="queryParam.name" />
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
<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-button type="primary" icon="plus" style="float: right" @click="handleAdd">新建</a-button> -->
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</div>
|
|
||||||
<a-table
|
|
||||||
bordered
|
|
||||||
rowKey="id"
|
|
||||||
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>
|
|
||||||
</div>
|
|
||||||
<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 label="想定名称" prop="name">
|
|
||||||
<a-input v-model="AEModal.form.name" />
|
|
||||||
</a-form-model-item>
|
|
||||||
</a-form-model>
|
|
||||||
</a-spin>
|
|
||||||
</h-modal>
|
|
||||||
</page-header-wrapper>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Txsjk',
|
name: 'Txsjk',
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
listLoading: false,
|
|
||||||
scenarioList: [],
|
|
||||||
|
|
||||||
queryParam: { id: '' },
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '#',
|
|
||||||
dataIndex: 'index',
|
|
||||||
customRender: (_, record, $index) => $index + 1,
|
|
||||||
align: 'center',
|
|
||||||
width: 80,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '分队',
|
|
||||||
dataIndex: '0',
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '方案类型',
|
|
||||||
dataIndex: '1',
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '方案目标',
|
|
||||||
dataIndex: '2',
|
|
||||||
align: 'left',
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '开始时间',
|
|
||||||
width: 160,
|
|
||||||
dataIndex: '3',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '结束时间',
|
|
||||||
width: 160,
|
|
||||||
dataIndex: '4',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '经度',
|
|
||||||
width: 120,
|
|
||||||
dataIndex: 'lat',
|
|
||||||
customRender: (_, record, $index) => record[5].split(',')[0],
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '纬度',
|
|
||||||
width: 120,
|
|
||||||
dataIndex: 'lon',
|
|
||||||
customRender: (_, record, $index) => record[5].split(',')[0],
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
loadData: [], // 加载数据方法 必须为 Promise 对象
|
|
||||||
loadingTable: false,
|
|
||||||
|
|
||||||
AEModal: {
|
|
||||||
title: '',
|
|
||||||
visible: false,
|
|
||||||
editStatus: false,
|
|
||||||
fullscreen: false,
|
|
||||||
spinning: false,
|
|
||||||
form: {},
|
|
||||||
rules: {
|
|
||||||
name: [{ required: true, message: '请输入想定名称!', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
labelCol: { xs: { span: 24 }, sm: { span: 7 } },
|
|
||||||
wrapperCol: { xs: { span: 24 }, sm: { span: 13 } },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getScenarioList()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getScenarioList() {
|
|
||||||
try {
|
|
||||||
this.listLoading = true
|
|
||||||
const res = await this.$http({
|
|
||||||
url: `/baseData/scenario/all`,
|
|
||||||
method: 'get',
|
|
||||||
})
|
|
||||||
this.scenarioList = res.data
|
|
||||||
this.queryParam.id = this.scenarioList[0].id
|
|
||||||
this.getList()
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
} finally {
|
|
||||||
this.listLoading = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleClickScenario(item) {
|
|
||||||
this.queryParam.id = item.id
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
resetList() {
|
|
||||||
this.queryParam = {}
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
async getList(parameter = {}) {
|
|
||||||
try {
|
|
||||||
this.loadingTable = true
|
|
||||||
const res = await this.$http({
|
|
||||||
url: '/baseData/scenario/schemeList',
|
|
||||||
method: 'get',
|
|
||||||
params: { ...parameter, ...this.queryParam },
|
|
||||||
})
|
|
||||||
this.loadData = res.data
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
} finally {
|
|
||||||
this.loadingTable = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleAdd() {
|
|
||||||
this.AEModal.title = '添加想定'
|
|
||||||
this.AEModal.editStatus = false
|
|
||||||
this.AEModal.visible = true
|
|
||||||
},
|
|
||||||
async handleEdit(record) {
|
|
||||||
try {
|
|
||||||
const res = await this.$http({
|
|
||||||
url: `/baseData/scenario/${record.id}`,
|
|
||||||
method: 'get',
|
|
||||||
})
|
|
||||||
this.AEModal.form = res.data.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/scenario/save`,
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
})
|
|
||||||
this.$message.success(this.AEModal.editStatus ? '编辑想定成功!' : '添加想定成功!')
|
|
||||||
this.getList()
|
|
||||||
this.handleClose()
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async handleDelete(record) {
|
|
||||||
try {
|
|
||||||
await this.$http({
|
|
||||||
url: `/baseData/scenario/remove/${record.id}`,
|
|
||||||
method: 'get',
|
|
||||||
})
|
|
||||||
this.$message.success('删除角色成功')
|
|
||||||
this.getList()
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
this.$message.error('删除角色失败')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ export default {
|
||||||
url: `/baseData/scenario/${record.id}`,
|
url: `/baseData/scenario/${record.id}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
this.AEModal.form = res.data.data
|
this.AEModal.form = res.data
|
||||||
this.AEModal.title = '编辑想定'
|
this.AEModal.title = '编辑想定'
|
||||||
this.AEModal.editStatus = true
|
this.AEModal.editStatus = true
|
||||||
this.AEModal.visible = true
|
this.AEModal.visible = true
|
||||||
|
|
|
@ -1,62 +1,36 @@
|
||||||
<template>
|
<template>
|
||||||
<page-header-wrapper>
|
<page-header-wrapper>
|
||||||
<div v-grid-box="{ columns: ['400px', 1] }">
|
<a-card :bordered="false">
|
||||||
<a-card :bordered="false">
|
<div class="table-page-search-wrapper">
|
||||||
<a-list :loading="listLoading" item-layout="horizontal" :data-source="scenarioList">
|
<a-form layout="inline">
|
||||||
<a-list-item slot="renderItem" slot-scope="item" @click="handleClickScenario(item)">
|
<a-row :gutter="48">
|
||||||
<a-list-item-meta :description="item.author">
|
<a-col :xl="8" :lg="8">
|
||||||
<span slot="title">{{ item.name }}</span>
|
<a-form-item label="想定名称">
|
||||||
<a-checkbox slot="avatar" :checked="item.id === queryParam.id"></a-checkbox>
|
<a-input placeholder="请输入" v-model="queryParam.name" />
|
||||||
</a-list-item-meta>
|
</a-form-item>
|
||||||
</a-list-item>
|
</a-col>
|
||||||
</a-list>
|
<a-col :xl="8" :lg="8">
|
||||||
</a-card>
|
<span class="table-page-search-submitButtons">
|
||||||
<a-card :bordered="false">
|
<a-button type="primary" @click="getList">查询</a-button>
|
||||||
<div class="table-page-search-wrapper">
|
<a-button style="margin-left: 8px" @click="resetList">重置</a-button>
|
||||||
<a-form layout="inline">
|
</span>
|
||||||
<a-row :gutter="48">
|
</a-col>
|
||||||
<!-- <a-col :xl="8" :lg="8">
|
</a-row>
|
||||||
<a-form-item label="想定名称">
|
</a-form>
|
||||||
<a-input placeholder="请输入" v-model="queryParam.name" />
|
</div>
|
||||||
</a-form-item>
|
<a-table
|
||||||
</a-col> -->
|
bordered
|
||||||
<a-col :xl="8" :lg="8">
|
rowKey="id"
|
||||||
<span class="table-page-search-submitButtons">
|
size="small"
|
||||||
<a-button type="primary" @click="getList">查询</a-button>
|
:columns="columns"
|
||||||
<a-button style="margin-left: 8px" @click="resetList">重置</a-button>
|
:dataSource="loadData"
|
||||||
</span>
|
:pagination="paginationProps"
|
||||||
</a-col>
|
:loading="loadingTable"
|
||||||
<a-col :xl="8" :lg="8">
|
@change="handleTableChange"
|
||||||
<!-- <a-button type="primary" icon="plus" style="float: right" @click="handleAdd">新建</a-button> -->
|
>
|
||||||
</a-col>
|
</a-table>
|
||||||
</a-row>
|
</a-card>
|
||||||
</a-form>
|
|
||||||
</div>
|
|
||||||
<a-table
|
|
||||||
bordered
|
|
||||||
rowKey="id"
|
|
||||||
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>
|
|
||||||
</div>
|
|
||||||
<h-modal
|
<h-modal
|
||||||
:title="AEModal.title"
|
:title="AEModal.title"
|
||||||
:width="640"
|
:width="640"
|
||||||
|
@ -86,67 +60,64 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Yxjlsjk',
|
name: 'Xdsjk',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
listLoading: false,
|
queryParam: {}, // 查询参数
|
||||||
scenarioList: [],
|
|
||||||
|
|
||||||
queryParam: { id: '' },
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '#',
|
title: '#',
|
||||||
dataIndex: 'index',
|
dataIndex: 'id',
|
||||||
customRender: (_, record, $index) => $index + 1,
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '分队',
|
title: '想定名称',
|
||||||
dataIndex: '0',
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '方案类型',
|
|
||||||
dataIndex: '1',
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '方案目标',
|
|
||||||
dataIndex: '2',
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
dataIndex: 'name',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '作者',
|
||||||
|
dataIndex: 'author',
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '运行状态',
|
||||||
|
dataIndex: 'finalStatus',
|
||||||
|
customRender: (t) => ({ 1: '中止', 2: '推演结束' }[t]),
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '开始时间',
|
title: '开始时间',
|
||||||
width: 160,
|
dataIndex: 'scenarioStartRunTime',
|
||||||
dataIndex: '3',
|
customRender: (t) => t?.replace('T', ' '),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '结束时间',
|
title: '结束时间',
|
||||||
width: 160,
|
dataIndex: 'scenarioEndRunTime',
|
||||||
dataIndex: '4',
|
customRender: (t) => t?.replace('T', ' '),
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '经度',
|
|
||||||
width: 120,
|
|
||||||
dataIndex: 'lat',
|
|
||||||
customRender: (_, record, $index) => record[5].split(',')[0],
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '纬度',
|
|
||||||
width: 120,
|
|
||||||
dataIndex: 'lon',
|
|
||||||
customRender: (_, record, $index) => record[5].split(',')[0],
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
loadData: [], // 加载数据方法 必须为 Promise 对象
|
loadData: [], // 加载数据方法 必须为 Promise 对象
|
||||||
loadingTable: false,
|
loadingTable: false,
|
||||||
|
|
||||||
|
selectedRowKeys: [],
|
||||||
|
selectedRows: [],
|
||||||
|
|
||||||
|
paginationProps: {
|
||||||
|
defaultPageSize: 10,
|
||||||
|
showSizeChanger: true,
|
||||||
|
showQuickJumper: true,
|
||||||
|
showTotal: (total) => {
|
||||||
|
return `共 ${total} 条`
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize),
|
||||||
|
},
|
||||||
|
|
||||||
AEModal: {
|
AEModal: {
|
||||||
title: '',
|
title: '',
|
||||||
visible: false,
|
visible: false,
|
||||||
|
@ -162,30 +133,10 @@ export default {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
this.getScenarioList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getScenarioList() {
|
|
||||||
try {
|
|
||||||
this.listLoading = true
|
|
||||||
const res = await this.$http({
|
|
||||||
url: `/baseData/scenario/all`,
|
|
||||||
method: 'get',
|
|
||||||
})
|
|
||||||
this.scenarioList = res.data
|
|
||||||
this.queryParam.id = this.scenarioList[0].id
|
|
||||||
this.getList()
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
} finally {
|
|
||||||
this.listLoading = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleClickScenario(item) {
|
|
||||||
this.queryParam.id = item.id
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
resetList() {
|
resetList() {
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
this.getList()
|
this.getList()
|
||||||
|
@ -194,17 +145,24 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.loadingTable = true
|
this.loadingTable = true
|
||||||
const res = await this.$http({
|
const res = await this.$http({
|
||||||
url: '/baseData/scenario/schemeList',
|
url: '/scenarioHistory/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { ...parameter, ...this.queryParam },
|
params: { ...parameter, ...this.queryParam },
|
||||||
})
|
})
|
||||||
this.loadData = res.data
|
this.loadData = res.data.data
|
||||||
|
this.paginationProps.total = res.data.totalCount
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
} finally {
|
} finally {
|
||||||
this.loadingTable = false
|
this.loadingTable = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleTableChange(pagination) {
|
||||||
|
const parameter = {}
|
||||||
|
parameter.pageSize = pagination.pageSize
|
||||||
|
parameter.pageNum = pagination.current
|
||||||
|
this.getList(parameter)
|
||||||
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.AEModal.title = '添加想定'
|
this.AEModal.title = '添加想定'
|
||||||
this.AEModal.editStatus = false
|
this.AEModal.editStatus = false
|
||||||
|
@ -216,7 +174,7 @@ export default {
|
||||||
url: `/baseData/scenario/${record.id}`,
|
url: `/baseData/scenario/${record.id}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
this.AEModal.form = res.data.data
|
this.AEModal.form = res.data
|
||||||
this.AEModal.title = '编辑想定'
|
this.AEModal.title = '编辑想定'
|
||||||
this.AEModal.editStatus = true
|
this.AEModal.editStatus = true
|
||||||
this.AEModal.visible = true
|
this.AEModal.visible = true
|
||||||
|
@ -238,7 +196,7 @@ export default {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params,
|
data: params,
|
||||||
})
|
})
|
||||||
this.$message.success(this.AEModal.editStatus ? '编辑想定成功!' : '添加想定成功!')
|
this.$message.success(`${this.AEModal.title}成功`)
|
||||||
this.getList()
|
this.getList()
|
||||||
this.handleClose()
|
this.handleClose()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -229,7 +229,7 @@ export default {
|
||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
this.getZzTree()
|
this.getZzTree()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -299,7 +299,6 @@ export default {
|
||||||
this.handleClose()
|
this.handleClose()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
this.$message.error(error.message || '未知错误,请重试')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async handleDelete(record) {
|
async handleDelete(record) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ export default {
|
||||||
systemPathMap: (state) => state.simulation.systemPathMap,
|
systemPathMap: (state) => state.simulation.systemPathMap,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
this.getSystemModules()
|
this.getSystemModules()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user