a
This commit is contained in:
parent
1b45cb6927
commit
53cacb507c
|
|
@ -1,6 +1,6 @@
|
||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
VUE_APP_PREVIEW=true
|
VUE_APP_PREVIEW=true
|
||||||
VUE_APP_API_BASE_URL=/api
|
VUE_APP_API_BASE_URL=/api
|
||||||
VUE_APP_API_URL=http://192.168.0.53:8099
|
VUE_APP_API_URL=http://192.168.0.225:8099
|
||||||
VUE_APP_MAP_BASE_URL=/map
|
VUE_APP_MAP_BASE_URL=/map
|
||||||
VUE_APP_MAP_URL=http://192.168.0.53:8090
|
VUE_APP_MAP_URL=http://192.168.0.225:8090
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
VUE_APP_PREVIEW=true
|
VUE_APP_PREVIEW=true
|
||||||
VUE_APP_API_BASE_URL=/api
|
VUE_APP_API_BASE_URL=/api
|
||||||
VUE_APP_API_URL=http://192.168.0.53:8099
|
VUE_APP_API_URL=http://192.168.0.225:8099
|
||||||
|
|
|
||||||
6
public/config.js
vendored
6
public/config.js
vendored
|
|
@ -5,7 +5,7 @@ window._CONFIG = {
|
||||||
TerrainProviderUrl: '/map/mapTerrain/',
|
TerrainProviderUrl: '/map/mapTerrain/',
|
||||||
thirdLoginUrl: 'http://127.0.0.1:8080/thirdLogin',
|
thirdLoginUrl: 'http://127.0.0.1:8080/thirdLogin',
|
||||||
clientId: '0123456789',
|
clientId: '0123456789',
|
||||||
evaluationSrc: 'http://192.168.0.53:8088/thirdLogin/thirdLoginPage?username=admin',
|
evaluationSrc: 'http://192.168.0.189:8088/thirdLogin/thirdLoginPage?username=admin',
|
||||||
VUE_APP_API_URL: 'http://192.168.0.53:8099',
|
VUE_APP_API_URL: 'http://192.168.0.225:8099',
|
||||||
VUE_APP_WEBSOCKET_URL: 'ws://192.168.0.53:8099',
|
VUE_APP_WEBSOCKET_URL: 'ws://192.168.0.225:8099',
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,12 @@
|
||||||
</div>
|
</div>
|
||||||
</ModuleWrapper>
|
</ModuleWrapper>
|
||||||
<ModuleWrapper height="55%" title="保障需求清单">
|
<ModuleWrapper height="55%" title="保障需求清单">
|
||||||
<!-- <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; overflow-y: auto">
|
<div class="normal" style="padding: 5px; overflow-y: auto">
|
||||||
<a-table
|
<a-table
|
||||||
class="simulation-table-plain"
|
class="simulation-table-plain"
|
||||||
|
|
@ -292,6 +292,51 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleChange(value, key, column) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
target[column] = value;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
edit(key) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
target.editable = true;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
save(key) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
delete target.editable;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel(key) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
Object.assign(target, this.cacheData.find(item => key === item.key));
|
||||||
|
delete target.editable;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleDelete(key) {
|
||||||
|
this.data = this.data.filter(item => item.key !== key);
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.data.push({
|
||||||
|
key: Date.now(),
|
||||||
|
name: '',
|
||||||
|
age: null,
|
||||||
|
address: '',
|
||||||
|
editable: true
|
||||||
|
});
|
||||||
|
},
|
||||||
getTree(target, treeData, showKeys) {
|
getTree(target, treeData, showKeys) {
|
||||||
treeData.forEach((item) => {
|
treeData.forEach((item) => {
|
||||||
const newChildren = []
|
const newChildren = []
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,45 @@
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</div>
|
</div>
|
||||||
</ModuleWrapper>
|
</ModuleWrapper>
|
||||||
<ModuleWrapper height="55%" title="保障需求清单">
|
<ModuleWrapper title="天气预设" height="25%">
|
||||||
|
<div>
|
||||||
|
<a-button type="primary" @click="handleAdd" icon="plus">新增</a-button>
|
||||||
|
<a-table
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="data"
|
||||||
|
:pagination="false"
|
||||||
|
bordered
|
||||||
|
rowKey="key"
|
||||||
|
>
|
||||||
|
<template v-for="col in ['name', 'age', 'address']" :slot="col" slot-scope="text, record">
|
||||||
|
<div :key="col">
|
||||||
|
<a-input
|
||||||
|
v-if="record.editable"
|
||||||
|
:value="text"
|
||||||
|
@change="e => handleChange(e.target.value, record.key, col)"
|
||||||
|
/>
|
||||||
|
<template v-else>{{ text }}</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template slot="operation" slot-scope="text, record">
|
||||||
|
<template v-if="record.editable">
|
||||||
|
<a @click="save(record.key)">保存</a>
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
<a @click="cancel(record.key)">取消</a>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<a @click="edit(record.key)">编辑</a>
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
<a-popconfirm title="确认删除?" @confirm="() => handleDelete(record.key)">
|
||||||
|
<a>删除</a>
|
||||||
|
</a-popconfirm>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
</ModuleWrapper>
|
||||||
|
<ModuleWrapper height="30%" title="保障需求清单">
|
||||||
<div class="normal" style="padding: 5px; overflow-y: auto">
|
<div class="normal" style="padding: 5px; overflow-y: auto">
|
||||||
<a-table
|
<a-table
|
||||||
class="simulation-table-plain"
|
class="simulation-table-plain"
|
||||||
|
|
@ -144,6 +182,18 @@ export default {
|
||||||
return {
|
return {
|
||||||
initial: false,
|
initial: false,
|
||||||
ws: null,
|
ws: null,
|
||||||
|
data: [],
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'serial' },
|
||||||
|
{ title: '天气类型', dataIndex: 'weatherType' },
|
||||||
|
{ title: '持续开始时间', dataIndex: 'lastBegTime' },
|
||||||
|
{ title: '持续结束时间', dataIndex: 'lastEndTime' },
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'operation',
|
||||||
|
scopedSlots: { customRender: 'operation' }
|
||||||
|
}
|
||||||
|
],
|
||||||
roomInfo: {
|
roomInfo: {
|
||||||
mag: '',
|
mag: '',
|
||||||
status: '',
|
status: '',
|
||||||
|
|
@ -261,6 +311,7 @@ export default {
|
||||||
this.scenarioId = this.$route.params.scenarioId
|
this.scenarioId = this.$route.params.scenarioId
|
||||||
this.scenarioName = this.$route.params.scenarioName
|
this.scenarioName = this.$route.params.scenarioName
|
||||||
this.getBlbzTreeData()
|
this.getBlbzTreeData()
|
||||||
|
this.getWeathers()
|
||||||
window.addEventListener('beforeunload', (e) => {
|
window.addEventListener('beforeunload', (e) => {
|
||||||
this.childWindow && this.childWindow.close()
|
this.childWindow && this.childWindow.close()
|
||||||
return true // 必须设置 returnValue 才能显示确认框
|
return true // 必须设置 returnValue 才能显示确认框
|
||||||
|
|
@ -276,6 +327,60 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getWeathers(){
|
||||||
|
this.$http({
|
||||||
|
url: `/baseData/weatherResource/list`,
|
||||||
|
method: 'get',
|
||||||
|
params: { scenarioId: this.scenarioId},
|
||||||
|
}).then(res => {
|
||||||
|
this.data = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleChange(value, key, column) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
target[column] = value;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
edit(key) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
target.editable = true;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
save(key) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
delete target.editable;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel(key) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
// Object.assign(target, this.newData.find(item => key === item.key));
|
||||||
|
delete target.editable;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleDelete(key) {
|
||||||
|
this.data = this.data.filter(item => item.key !== key);
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.data.push({
|
||||||
|
key: Date.now(),
|
||||||
|
name: '',
|
||||||
|
age: null,
|
||||||
|
address: '',
|
||||||
|
editable: true
|
||||||
|
});
|
||||||
|
},
|
||||||
getTree(target, treeData, showKeys) {
|
getTree(target, treeData, showKeys) {
|
||||||
treeData.forEach((item) => {
|
treeData.forEach((item) => {
|
||||||
const newChildren = []
|
const newChildren = []
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,45 @@
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</div>
|
</div>
|
||||||
</ModuleWrapper>
|
</ModuleWrapper>
|
||||||
<ModuleWrapper height="55%">
|
<ModuleWrapper title="天气预设" height="25%">
|
||||||
|
<div>
|
||||||
|
<a-button type="primary" @click="handleAdd" icon="plus">新增</a-button>
|
||||||
|
<a-table
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="this.weatherData"
|
||||||
|
:pagination="false"
|
||||||
|
bordered
|
||||||
|
rowKey="key"
|
||||||
|
>
|
||||||
|
<!-- <template v-for="col in columns" :slot="col" slot-scope="text, record">-->
|
||||||
|
<!-- <div :key="col">-->
|
||||||
|
<!-- <a-input-->
|
||||||
|
<!-- v-if="record.editable"-->
|
||||||
|
<!-- :value="text"-->
|
||||||
|
<!-- @change="e => handleChange(e.target.value, record.key, col)"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- <template v-else>{{ text }}</template>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
|
||||||
|
<!-- <template slot="operation" slot-scope="text, record">-->
|
||||||
|
<!-- <template v-if="record.editable">-->
|
||||||
|
<!-- <a @click="save(record.key)">保存</a>-->
|
||||||
|
<!-- <a-divider type="vertical" />-->
|
||||||
|
<!-- <a @click="cancel(record.key)">取消</a>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template v-else>-->
|
||||||
|
<!-- <a @click="edit(record.key)">编辑</a>-->
|
||||||
|
<!-- <a-divider type="vertical" />-->
|
||||||
|
<!-- <a-popconfirm title="确认删除?" @confirm="() => handleDelete(record.key)">-->
|
||||||
|
<!-- <a>删除</a>-->
|
||||||
|
<!-- </a-popconfirm>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
</ModuleWrapper>
|
||||||
|
<ModuleWrapper height="30%">
|
||||||
<template #title>
|
<template #title>
|
||||||
<a-radio-group v-model="fd.type" button-style="solid" @change="getFdListData">
|
<a-radio-group v-model="fd.type" button-style="solid" @change="getFdListData">
|
||||||
<a-radio-button :value="5">作战分队</a-radio-button>
|
<a-radio-button :value="5">作战分队</a-radio-button>
|
||||||
|
|
@ -188,7 +226,6 @@ import Zoom from './components/Zoom.vue'
|
||||||
import BlbzModal from './components/BlbzModal.vue'
|
import BlbzModal from './components/BlbzModal.vue'
|
||||||
import Jcsx from './components/Jcsx.vue'
|
import Jcsx from './components/Jcsx.vue'
|
||||||
import Zzxd from './components/Zzxd.vue'
|
import Zzxd from './components/Zzxd.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SubsystemScenePresetting',
|
name: 'SubsystemScenePresetting',
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -203,6 +240,20 @@ export default {
|
||||||
scenarioName: '',
|
scenarioName: '',
|
||||||
cesium: null,
|
cesium: null,
|
||||||
scenarioDetail: null,
|
scenarioDetail: null,
|
||||||
|
weatherData:[
|
||||||
|
{ key: '1', weatherType: '张三', lastBegTime: 32, editable: false },
|
||||||
|
{ key: '2', weatherType: '李四', lastBegTime: 42, editable: false }
|
||||||
|
],
|
||||||
|
columns: [
|
||||||
|
{ title: '天气类型', dataIndex: 'weatherType',key: 'weatherType' },
|
||||||
|
{ title: '持续开始时间', dataIndex: 'lastBegTime',key: 'lastBegTime' },
|
||||||
|
{ title: '持续结束时间', dataIndex: 'lastEndTime',key: 'lastEndTime' },
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'operation',
|
||||||
|
scopedSlots: { customRender: 'operation' }
|
||||||
|
}
|
||||||
|
],
|
||||||
zzbzll: {
|
zzbzll: {
|
||||||
loading: false,
|
loading: false,
|
||||||
treeData: [],
|
treeData: [],
|
||||||
|
|
@ -270,7 +321,9 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.scenarioId = this.$route.params.scenarioId
|
this.scenarioId = this.$route.params.scenarioId
|
||||||
|
console.log("============="+this.$route.params.scenarioId)
|
||||||
this.scenarioName = this.$route.params.scenarioName
|
this.scenarioName = this.$route.params.scenarioName
|
||||||
|
this.getWeathers()
|
||||||
window.addEventListener('beforeunload', (e) => {
|
window.addEventListener('beforeunload', (e) => {
|
||||||
this.childWindow && this.childWindow.close()
|
this.childWindow && this.childWindow.close()
|
||||||
return true // 必须设置 returnValue 才能显示确认框
|
return true // 必须设置 returnValue 才能显示确认框
|
||||||
|
|
@ -283,6 +336,61 @@ export default {
|
||||||
this.getFdListData()
|
this.getFdListData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getWeathers(){
|
||||||
|
this.$http({
|
||||||
|
url: `/baseData/weatherResource/list`,
|
||||||
|
method: 'get',
|
||||||
|
params: { scenarioId: this.scenarioId},
|
||||||
|
}).then(res => {
|
||||||
|
this.weatherData = res.data
|
||||||
|
console.log("================="+JSON.stringify(this.weatherData))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleChange(value, key, column) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
target[column] = value;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
edit(key) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
target.editable = true;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
save(key) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
delete target.editable;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel(key) {
|
||||||
|
const newData = [...this.data];
|
||||||
|
const target = newData.find(item => key === item.key);
|
||||||
|
if (target) {
|
||||||
|
// Object.assign(target, this.newData.find(item => key === item.key));
|
||||||
|
delete target.editable;
|
||||||
|
this.data = newData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleDelete(key) {
|
||||||
|
this.data = this.data.filter(item => item.key !== key);
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.data.push({
|
||||||
|
key: Date.now(),
|
||||||
|
name: '',
|
||||||
|
age: null,
|
||||||
|
address: '',
|
||||||
|
editable: true
|
||||||
|
});
|
||||||
|
},
|
||||||
getTree(target, treeData, showKeys) {
|
getTree(target, treeData, showKeys) {
|
||||||
treeData.forEach((item) => {
|
treeData.forEach((item) => {
|
||||||
const newChildren = []
|
const newChildren = []
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ const vueConfig = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'/map': {
|
'/map': {
|
||||||
target: process.env.VUE_APP_MAP_URL + '/map',
|
target: process.env.VUE_APP_MAP_URL + '/',
|
||||||
ws: false,
|
ws: false,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user