coding
This commit is contained in:
parent
4c9a73f797
commit
635c05d46f
5
.env.one
Normal file
5
.env.one
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
NODE_ENV=one
|
||||
VUE_APP_PREVIEW=true
|
||||
VUE_APP_API_BASE_URL=/api
|
||||
VUE_APP_API_URL=http://192.168.0.225:8099
|
||||
VUE_APP_PORT=8001
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"serve:8001": "vue-cli-service serve --mode=one",
|
||||
"build": "vue-cli-service build",
|
||||
"test:unit": "vue-cli-service test:unit",
|
||||
"lint": "vue-cli-service lint",
|
||||
|
|
|
|||
11
public/config.one.js
vendored
Normal file
11
public/config.one.js
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// @ts-ignore
|
||||
window._CONFIG = {
|
||||
ImageryProviderUrl: '/map/mapWX/{z}/{x}/{y}.jpg',
|
||||
RoadProviderUrl: '',
|
||||
TerrainProviderUrl: '/map/mapTerrain/',
|
||||
thirdLoginUrl: 'http://127.0.0.1:8080/thirdLogin',
|
||||
clientId: '0123456789',
|
||||
evaluationSrc: 'http://192.168.0.225:8088/thirdLogin/thirdLoginPage?username=admin',
|
||||
VUE_APP_API_URL: 'http://192.168.0.225:8099',
|
||||
VUE_APP_WEBSOCKET_URL: 'ws://192.168.0.225:8099',
|
||||
}
|
||||
3
public/index.html
vendored
3
public/index.html
vendored
|
|
@ -19,6 +19,9 @@
|
|||
<script src="/qt-helper.js"></script>
|
||||
<script src="/qwebchannel.js"></script>
|
||||
<script src="/config.js"></script>
|
||||
<% if (process.env.NODE_ENV === 'one') { %>
|
||||
<script src="/config.one.js"></script>
|
||||
<% } %>
|
||||
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
|
||||
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
|
||||
<% } %>
|
||||
|
|
|
|||
|
|
@ -170,10 +170,11 @@ export default {
|
|||
tableConfig: {
|
||||
table: {},
|
||||
immediate: false,
|
||||
query: () =>
|
||||
query: (params) =>
|
||||
this.$http({
|
||||
url: `/baseData/fightPowerHierarchy/staff/${this.zzjg.selectedKeys[0]}`,
|
||||
method: 'get',
|
||||
params,
|
||||
}),
|
||||
columns: [
|
||||
{ dataIndex: 'serial' },
|
||||
|
|
@ -218,10 +219,11 @@ export default {
|
|||
tableConfig: {
|
||||
table: {},
|
||||
immediate: false,
|
||||
query: () =>
|
||||
query: (params) =>
|
||||
this.$http({
|
||||
url: `/baseData/fightPowerHierarchy/weapon/${this.zzjg.selectedKeys[0]}`,
|
||||
method: 'get',
|
||||
params,
|
||||
}),
|
||||
columns: [
|
||||
{ dataIndex: 'serial' },
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default {
|
|||
fdTable: {
|
||||
queryConfig: false,
|
||||
tableConfig: {
|
||||
query: () => getAction('/team/list'),
|
||||
query: (params) => getAction('/team/list', params),
|
||||
columns: [
|
||||
{ dataIndex: 'serial' },
|
||||
{ dataIndex: 'name', title: '分队名称', width: 'auto', minWidth: 160 },
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ export default {
|
|||
tableConfig: {
|
||||
table: {},
|
||||
immediate: false,
|
||||
query: () =>
|
||||
query: (params) =>
|
||||
this.$http({
|
||||
url: '/baseData/scenario/taskList',
|
||||
method: 'get',
|
||||
params: { id: this.xd.selectedKeys[0] },
|
||||
params: { id: this.xd.selectedKeys[0], ...params },
|
||||
}).then((res) => ({
|
||||
data: res.data.map(([a, b, c], index) => ({ id: index, 0: a, 1: b, 2: c })),
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export default {
|
|||
txTable: {
|
||||
queryConfig: false,
|
||||
tableConfig: {
|
||||
query: () => getAction('/icon/list'),
|
||||
query: (params) => getAction('/icon/list', params),
|
||||
columns: [
|
||||
{ dataIndex: 'serial' },
|
||||
{ dataIndex: 'iconName', title: '军标名称', width: 'auto', align: 'center' },
|
||||
|
|
|
|||
|
|
@ -519,7 +519,12 @@ export default {
|
|||
handleOpenEditZbflModal(data) {
|
||||
this.zbflModal.title = '编辑装备分类'
|
||||
this.zbflModal.mode = 'edit'
|
||||
this.zbflModal.formData = { id: data.id, parentId: data.parentId, entityName: data.entityName,entityType: data.entityType }
|
||||
this.zbflModal.formData = {
|
||||
id: data.id,
|
||||
parentId: data.parentId,
|
||||
entityName: data.entityName,
|
||||
entityType: data.entityType,
|
||||
}
|
||||
this.zbflModal.visible = true
|
||||
},
|
||||
handleSubmitZbfl(formData) {
|
||||
|
|
@ -599,7 +604,7 @@ export default {
|
|||
handleOpenEditZbModal(record) {
|
||||
this.AECModal.opType = 3
|
||||
this.AECModal.parentTableRowId = record.id
|
||||
console.log('======'+record.id)
|
||||
console.log('======' + record.id)
|
||||
this.AECModal.title = '编辑 ' + record.name + ' 实体'
|
||||
this.AECModal.visible = true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,19 +5,35 @@
|
|||
<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"
|
||||
<a-tree
|
||||
:treeData="zzjg.treeData"
|
||||
:selectedKeys.sync="zzjg.selectedKeys"
|
||||
:expandedKeys.sync="zzjg.expandedKeys"
|
||||
@select="handleChangeZzjgSelected">
|
||||
@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>
|
||||
<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>
|
||||
|
|
@ -27,19 +43,22 @@
|
|||
<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"
|
||||
<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'" />
|
||||
</template>
|
||||
<AntQueryTable
|
||||
ref="zzry-table"
|
||||
height="100%"
|
||||
:queryConfig="zzry.queryConfig"
|
||||
<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 }">
|
||||
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzryModal(record)"></a-button>
|
||||
</template>
|
||||
|
|
@ -48,18 +67,22 @@
|
|||
<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"
|
||||
<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'" />
|
||||
</template>
|
||||
<AntQueryTable
|
||||
ref="zzzb-table" height="100%"
|
||||
:queryConfig="zzzb.queryConfig"
|
||||
<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 }">
|
||||
<a-button type="text-primary" icon="edit" @click="handleOpenEditZzzbModal(record)"></a-button>
|
||||
</template>
|
||||
|
|
@ -69,50 +92,65 @@
|
|||
<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"
|
||||
<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'" />
|
||||
</template>
|
||||
<AntQueryTable
|
||||
ref="zzwz-table"
|
||||
height="100%"
|
||||
:queryConfig="zzwz.queryConfig"
|
||||
<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 }">
|
||||
<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"
|
||||
<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"
|
||||
: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"
|
||||
: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>
|
||||
:formRules="zzzbModal.formRules"
|
||||
:formData="zzzbModal.formData"
|
||||
:onSubmit="handleSubmitZzzb"
|
||||
@success="handleSubmitZzzbSuccess"
|
||||
></AntFormModal>
|
||||
<!-- 组织物资模态框 -->
|
||||
<AntFormModal
|
||||
:visible.sync="zzwzModal.visible"
|
||||
:title="zzwzModal.title"
|
||||
<AntFormModal
|
||||
:visible.sync="zzwzModal.visible"
|
||||
:title="zzwzModal.title"
|
||||
:formItems="zzwzFormItems"
|
||||
:formRules="zzwzModal.formRules" :formData="zzwzModal.formData" :onSubmit="handleSubmitZzwz"
|
||||
@success="handleSubmitZzwzSuccess"></AntFormModal>
|
||||
:formRules="zzwzModal.formRules"
|
||||
:formData="zzwzModal.formData"
|
||||
:onSubmit="handleSubmitZzwz"
|
||||
@success="handleSubmitZzwzSuccess"
|
||||
></AntFormModal>
|
||||
</page-header-wrapper>
|
||||
</template>
|
||||
|
||||
|
|
@ -167,10 +205,11 @@ export default {
|
|||
tableConfig: {
|
||||
table: {},
|
||||
immediate: false,
|
||||
query: () =>
|
||||
query: (params) =>
|
||||
this.$http({
|
||||
url: `/baseData/fightPowerHierarchy/staff/${this.zzjg.selectedKeys[0]}`,
|
||||
method: 'get',
|
||||
params,
|
||||
}),
|
||||
columns: [
|
||||
{ dataIndex: 'serial' },
|
||||
|
|
@ -215,10 +254,11 @@ export default {
|
|||
tableConfig: {
|
||||
table: {},
|
||||
immediate: false,
|
||||
query: () =>
|
||||
query: (params) =>
|
||||
this.$http({
|
||||
url: `/baseData/fightPowerHierarchy/weapon/${this.zzjg.selectedKeys[0]}`,
|
||||
method: 'get',
|
||||
params,
|
||||
}),
|
||||
columns: [
|
||||
{ dataIndex: 'serial' },
|
||||
|
|
@ -262,10 +302,11 @@ export default {
|
|||
tableConfig: {
|
||||
table: {},
|
||||
immediate: false,
|
||||
query: () =>
|
||||
query: (params) =>
|
||||
this.$http({
|
||||
url: `baseData/fightPowerHierarchy/supplier/getByOrgId?id=${this.zzjg.selectedKeys[0]}`, // 修改为material
|
||||
method: 'get',
|
||||
params,
|
||||
}),
|
||||
columns: [
|
||||
{ dataIndex: 'serial' },
|
||||
|
|
@ -318,18 +359,18 @@ export default {
|
|||
return [
|
||||
this.zzzbModal.mode === 'add'
|
||||
? {
|
||||
label: '装备名称',
|
||||
prop: 'weaponId',
|
||||
component: 'AntOriginTreeSelect',
|
||||
options: {
|
||||
dataSource: () =>
|
||||
this.$http({
|
||||
url: '/tree/armament',
|
||||
method: 'get',
|
||||
}),
|
||||
readonly: false,
|
||||
},
|
||||
}
|
||||
label: '装备名称',
|
||||
prop: 'weaponId',
|
||||
component: 'AntOriginTreeSelect',
|
||||
options: {
|
||||
dataSource: () =>
|
||||
this.$http({
|
||||
url: '/tree/armament',
|
||||
method: 'get',
|
||||
}),
|
||||
readonly: false,
|
||||
},
|
||||
}
|
||||
: { label: '装备名称', prop: 'name', customRender: (v) => v },
|
||||
{ label: '装备数量', prop: 'number' },
|
||||
]
|
||||
|
|
@ -338,19 +379,19 @@ export default {
|
|||
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: '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' },
|
||||
]
|
||||
|
|
@ -419,7 +460,7 @@ export default {
|
|||
})
|
||||
this.$message.success('删除成功')
|
||||
this.getZzTree()
|
||||
} catch (error) { }
|
||||
} catch (error) {}
|
||||
},
|
||||
|
||||
handleOpenAddZzryModal() {
|
||||
|
|
@ -470,7 +511,6 @@ export default {
|
|||
this.$refs['zzzb-table'].commitAction('query')
|
||||
},
|
||||
|
||||
|
||||
handleOpenAddZzwzModal() {
|
||||
this.zzwzModal.title = '新建组织物资' // 修改标题
|
||||
this.zzwzModal.mode = 'add'
|
||||
|
|
|
|||
|
|
@ -217,6 +217,11 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getRoomList()
|
||||
|
||||
window.addEventListener('beforeunload', (e) => {
|
||||
this.closeWebsocket()
|
||||
return true
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.closeWebsocket()
|
||||
|
|
@ -252,6 +257,7 @@ export default {
|
|||
},
|
||||
closeWebsocket() {
|
||||
this.ws && this.ws.close()
|
||||
this.ws = null
|
||||
},
|
||||
async getRoomDetail() {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@ export default {
|
|||
this.scenarioId = this.$route.params.scenarioId
|
||||
this.scenarioName = this.$route.params.scenarioName
|
||||
this.initWebsocket()
|
||||
|
||||
window.addEventListener('beforeunload', (e) => {
|
||||
this.closeWebsocket()
|
||||
return true
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.cesium = new window.MyCesium('display-cesium-container')
|
||||
|
|
@ -67,6 +72,7 @@ export default {
|
|||
},
|
||||
closeWebsocket() {
|
||||
this.ws && this.ws.close()
|
||||
this.ws = null
|
||||
},
|
||||
async getZzbzllTreeData(initPlot = false) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -305,6 +305,11 @@ export default {
|
|||
this.scenarioId = this.$route.params.scenarioId
|
||||
this.scenarioName = this.$route.params.scenarioName
|
||||
this.initWebsocket()
|
||||
|
||||
window.addEventListener('beforeunload', (e) => {
|
||||
this.closeWebsocket()
|
||||
return true
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.cesium = new window.MyCesium('model-cesium-container')
|
||||
|
|
@ -330,6 +335,7 @@ export default {
|
|||
},
|
||||
closeWebsocket() {
|
||||
this.ws && this.ws.close()
|
||||
this.ws = null
|
||||
},
|
||||
getTree(target, treeData, checkedKeys) {
|
||||
treeData.forEach((item) => {
|
||||
|
|
@ -484,6 +490,9 @@ export default {
|
|||
overflow: hidden;
|
||||
}
|
||||
::v-deep {
|
||||
.distance-legend {
|
||||
left: 320px;
|
||||
}
|
||||
.compass {
|
||||
right: 320px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,6 +286,11 @@ export default {
|
|||
this.scenarioId = this.$route.params.scenarioId
|
||||
this.scenarioName = this.$route.params.scenarioName
|
||||
this.initWebsocket()
|
||||
|
||||
window.addEventListener('beforeunload', (e) => {
|
||||
this.closeWebsocket()
|
||||
return true
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.cesium = new window.MyCesium('scene-cesium-container')
|
||||
|
|
@ -312,6 +317,7 @@ export default {
|
|||
},
|
||||
closeWebsocket() {
|
||||
this.ws && this.ws.close()
|
||||
this.ws = null
|
||||
},
|
||||
getTree(target, treeData, checkedKeys) {
|
||||
treeData.forEach((item) => {
|
||||
|
|
@ -387,6 +393,34 @@ export default {
|
|||
console.log(error)
|
||||
}
|
||||
},
|
||||
dragend(item, e) {
|
||||
const minX = this.$refs['scene-cesium-container'].offsetLeft
|
||||
const maxX = this.$refs['scene-cesium-container'].offsetLeft + this.$refs['scene-cesium-container'].offsetWidth
|
||||
const minY = this.$refs['scene-cesium-container'].offsetTop
|
||||
const maxY = this.$refs['scene-cesium-container'].offsetTop + this.$refs['scene-cesium-container'].offsetHeight
|
||||
if (e.x < minX || e.x > maxX || e.Y < minY || e.Y > maxY) return
|
||||
|
||||
const x = e.x - this.$refs['scene-cesium-container'].offsetLeft
|
||||
const y = e.y - this.$refs['scene-cesium-container'].offsetTop
|
||||
const { plotId, longitude, latitude } = this.cesium.addPlotByOffset(item.imgBase64, { x, y })
|
||||
this.savePlot(this.model.queryParams.force, item, { plotId, longitude, latitude })
|
||||
},
|
||||
async savePlot(force, item, { plotId, longitude, latitude }) {
|
||||
try {
|
||||
await postAction('/scenario/resource/save', {
|
||||
id: plotId,
|
||||
scenarioId: this.scenarioId,
|
||||
type: force,
|
||||
resourceType: item.type,
|
||||
resourceId: item.id,
|
||||
lng: longitude,
|
||||
lat: latitude,
|
||||
})
|
||||
this.getZzbzllTreeData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
handleSelectZzbzll(selectedKeys, { node }) {
|
||||
this.cesium.setClientByCenter({ longitude: +node.dataRef.lng, latitude: +node.dataRef.lat })
|
||||
this.blbz.modelData = node.dataRef
|
||||
|
|
@ -473,6 +507,9 @@ export default {
|
|||
overflow: hidden;
|
||||
}
|
||||
::v-deep {
|
||||
.distance-legend {
|
||||
left: 320px;
|
||||
}
|
||||
.compass {
|
||||
right: 320px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,6 +356,34 @@ export default {
|
|||
console.log(error)
|
||||
}
|
||||
},
|
||||
dragend(item, e) {
|
||||
const minX = this.$refs['scene-presetting-cesium-container'].offsetLeft
|
||||
const maxX = this.$refs['scene-presetting-cesium-container'].offsetLeft + this.$refs['scene-presetting-cesium-container'].offsetWidth
|
||||
const minY = this.$refs['scene-presetting-cesium-container'].offsetTop
|
||||
const maxY = this.$refs['scene-presetting-cesium-container'].offsetTop + this.$refs['scene-presetting-cesium-container'].offsetHeight
|
||||
if (e.x < minX || e.x > maxX || e.Y < minY || e.Y > maxY) return
|
||||
|
||||
const x = e.x - this.$refs['scene-presetting-cesium-container'].offsetLeft
|
||||
const y = e.y - this.$refs['scene-presetting-cesium-container'].offsetTop
|
||||
const { plotId, longitude, latitude } = this.cesium.addPlotByOffset(item.imgBase64, { x, y })
|
||||
this.savePlot(this.model.queryParams.force, item, { plotId, longitude, latitude })
|
||||
},
|
||||
async savePlot(force, item, { plotId, longitude, latitude }) {
|
||||
try {
|
||||
await postAction('/scenario/resource/save', {
|
||||
id: plotId,
|
||||
scenarioId: this.scenarioId,
|
||||
type: force,
|
||||
resourceType: item.type,
|
||||
resourceId: item.id,
|
||||
lng: longitude,
|
||||
lat: latitude,
|
||||
})
|
||||
this.getZzbzllTreeData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
handleSelectZzbzll(selectedKeys, { node }) {
|
||||
this.cesium.setClientByCenter({ longitude: +node.dataRef.lng, latitude: +node.dataRef.lat })
|
||||
this.blbz.modelData = node.dataRef
|
||||
|
|
@ -442,6 +470,9 @@ export default {
|
|||
overflow: hidden;
|
||||
}
|
||||
::v-deep {
|
||||
.distance-legend {
|
||||
left: 320px;
|
||||
}
|
||||
.compass {
|
||||
right: 320px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ const GitRevisionPlugin = require('git-revision-webpack-plugin')
|
|||
const GitRevision = new GitRevisionPlugin()
|
||||
const buildDate = JSON.stringify(new Date().toLocaleString())
|
||||
const createThemeColorReplacerPlugin = require('./config/plugin.config')
|
||||
const port = process.env.VUE_APP_PORT || 8000
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
|
|
@ -108,8 +109,8 @@ const vueConfig = {
|
|||
|
||||
devServer: {
|
||||
// development server port 8000
|
||||
port: 8000,
|
||||
public: os.networkInterfaces().以太网?.slice(-1)[0].address + ':8000',
|
||||
port,
|
||||
public: os.networkInterfaces().以太网?.slice(-1)[0].address + ':' + port,
|
||||
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
||||
proxy: {
|
||||
'/api': {
|
||||
|
|
@ -134,7 +135,6 @@ const vueConfig = {
|
|||
|
||||
// disable source map in production
|
||||
productionSourceMap: false,
|
||||
lintOnSave: undefined,
|
||||
// babel-loader no-ignore node_modules/*
|
||||
transpileDependencies: ['@cesium/widgets', '@cesium/engine'],
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user