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,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
|
"serve:8001": "vue-cli-service serve --mode=one",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"test:unit": "vue-cli-service test:unit",
|
"test:unit": "vue-cli-service test:unit",
|
||||||
"lint": "vue-cli-service lint",
|
"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="/qt-helper.js"></script>
|
||||||
<script src="/qwebchannel.js"></script>
|
<script src="/qwebchannel.js"></script>
|
||||||
<script src="/config.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) { %>
|
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
|
||||||
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
|
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
||||||
|
|
@ -170,10 +170,11 @@ export default {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
table: {},
|
table: {},
|
||||||
immediate: false,
|
immediate: false,
|
||||||
query: () =>
|
query: (params) =>
|
||||||
this.$http({
|
this.$http({
|
||||||
url: `/baseData/fightPowerHierarchy/staff/${this.zzjg.selectedKeys[0]}`,
|
url: `/baseData/fightPowerHierarchy/staff/${this.zzjg.selectedKeys[0]}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params,
|
||||||
}),
|
}),
|
||||||
columns: [
|
columns: [
|
||||||
{ dataIndex: 'serial' },
|
{ dataIndex: 'serial' },
|
||||||
|
|
@ -218,10 +219,11 @@ export default {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
table: {},
|
table: {},
|
||||||
immediate: false,
|
immediate: false,
|
||||||
query: () =>
|
query: (params) =>
|
||||||
this.$http({
|
this.$http({
|
||||||
url: `/baseData/fightPowerHierarchy/weapon/${this.zzjg.selectedKeys[0]}`,
|
url: `/baseData/fightPowerHierarchy/weapon/${this.zzjg.selectedKeys[0]}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params,
|
||||||
}),
|
}),
|
||||||
columns: [
|
columns: [
|
||||||
{ dataIndex: 'serial' },
|
{ dataIndex: 'serial' },
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ export default {
|
||||||
fdTable: {
|
fdTable: {
|
||||||
queryConfig: false,
|
queryConfig: false,
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
query: () => getAction('/team/list'),
|
query: (params) => getAction('/team/list', params),
|
||||||
columns: [
|
columns: [
|
||||||
{ dataIndex: 'serial' },
|
{ dataIndex: 'serial' },
|
||||||
{ dataIndex: 'name', title: '分队名称', width: 'auto', minWidth: 160 },
|
{ dataIndex: 'name', title: '分队名称', width: 'auto', minWidth: 160 },
|
||||||
|
|
|
||||||
|
|
@ -46,11 +46,11 @@ export default {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
table: {},
|
table: {},
|
||||||
immediate: false,
|
immediate: false,
|
||||||
query: () =>
|
query: (params) =>
|
||||||
this.$http({
|
this.$http({
|
||||||
url: '/baseData/scenario/taskList',
|
url: '/baseData/scenario/taskList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { id: this.xd.selectedKeys[0] },
|
params: { id: this.xd.selectedKeys[0], ...params },
|
||||||
}).then((res) => ({
|
}).then((res) => ({
|
||||||
data: res.data.map(([a, b, c], index) => ({ id: index, 0: a, 1: b, 2: c })),
|
data: res.data.map(([a, b, c], index) => ({ id: index, 0: a, 1: b, 2: c })),
|
||||||
})),
|
})),
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ export default {
|
||||||
txTable: {
|
txTable: {
|
||||||
queryConfig: false,
|
queryConfig: false,
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
query: () => getAction('/icon/list'),
|
query: (params) => getAction('/icon/list', params),
|
||||||
columns: [
|
columns: [
|
||||||
{ dataIndex: 'serial' },
|
{ dataIndex: 'serial' },
|
||||||
{ dataIndex: 'iconName', title: '军标名称', width: 'auto', align: 'center' },
|
{ dataIndex: 'iconName', title: '军标名称', width: 'auto', align: 'center' },
|
||||||
|
|
|
||||||
|
|
@ -519,7 +519,12 @@ export default {
|
||||||
handleOpenEditZbflModal(data) {
|
handleOpenEditZbflModal(data) {
|
||||||
this.zbflModal.title = '编辑装备分类'
|
this.zbflModal.title = '编辑装备分类'
|
||||||
this.zbflModal.mode = 'edit'
|
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
|
this.zbflModal.visible = true
|
||||||
},
|
},
|
||||||
handleSubmitZbfl(formData) {
|
handleSubmitZbfl(formData) {
|
||||||
|
|
@ -599,7 +604,7 @@ export default {
|
||||||
handleOpenEditZbModal(record) {
|
handleOpenEditZbModal(record) {
|
||||||
this.AECModal.opType = 3
|
this.AECModal.opType = 3
|
||||||
this.AECModal.parentTableRowId = record.id
|
this.AECModal.parentTableRowId = record.id
|
||||||
console.log('======'+record.id)
|
console.log('======' + record.id)
|
||||||
this.AECModal.title = '编辑 ' + record.name + ' 实体'
|
this.AECModal.title = '编辑 ' + record.name + ' 实体'
|
||||||
this.AECModal.visible = true
|
this.AECModal.visible = true
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,31 @@
|
||||||
:treeData="zzjg.treeData"
|
:treeData="zzjg.treeData"
|
||||||
:selectedKeys.sync="zzjg.selectedKeys"
|
:selectedKeys.sync="zzjg.selectedKeys"
|
||||||
:expandedKeys.sync="zzjg.expandedKeys"
|
: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']">
|
||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<Flex class="contextmenu-zz">
|
<Flex class="contextmenu-zz">
|
||||||
<a-button type="text-primary" icon="edit" title="编辑" @click="handleOpenEditZzjgModal(id)"></a-button>
|
<a-button
|
||||||
<a-button type="text-primary" icon="plus" title="新增子项" @click="handleOpenAddZzjgModal(id)"></a-button>
|
type="text-primary"
|
||||||
<a-button type="text-danger" icon="delete" title="删除" @click="handleDeleteZzjg(id, title)"></a-button>
|
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>
|
</Flex>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
|
|
@ -31,7 +47,8 @@
|
||||||
v-if="layoutRight === 'zzry'"
|
v-if="layoutRight === 'zzry'"
|
||||||
type="fullscreen-exit"
|
type="fullscreen-exit"
|
||||||
style="font-size: 32px"
|
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
|
<AntQueryTable
|
||||||
|
|
@ -39,7 +56,9 @@
|
||||||
height="100%"
|
height="100%"
|
||||||
:queryConfig="zzry.queryConfig"
|
:queryConfig="zzry.queryConfig"
|
||||||
:tableConfig="zzry.tableConfig"
|
: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>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -52,14 +71,18 @@
|
||||||
v-if="layoutRight === 'zzzb'"
|
v-if="layoutRight === 'zzzb'"
|
||||||
type="fullscreen-exit"
|
type="fullscreen-exit"
|
||||||
style="font-size: 32px"
|
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
|
<AntQueryTable
|
||||||
ref="zzzb-table" height="100%"
|
ref="zzzb-table"
|
||||||
|
height="100%"
|
||||||
:queryConfig="zzzb.queryConfig"
|
:queryConfig="zzzb.queryConfig"
|
||||||
:tableConfig="zzzb.tableConfig"
|
: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>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -73,7 +96,8 @@
|
||||||
v-if="layoutRight === 'zzwz'"
|
v-if="layoutRight === 'zzwz'"
|
||||||
type="fullscreen-exit"
|
type="fullscreen-exit"
|
||||||
style="font-size: 32px"
|
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
|
<AntQueryTable
|
||||||
|
|
@ -81,7 +105,9 @@
|
||||||
height="100%"
|
height="100%"
|
||||||
:queryConfig="zzwz.queryConfig"
|
:queryConfig="zzwz.queryConfig"
|
||||||
:tableConfig="zzwz.tableConfig"
|
: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>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -92,27 +118,39 @@
|
||||||
:visible.sync="zzjgModal.visible"
|
:visible.sync="zzjgModal.visible"
|
||||||
:title="zzjgModal.title"
|
:title="zzjgModal.title"
|
||||||
:formItems="zzjgModal.formItems"
|
:formItems="zzjgModal.formItems"
|
||||||
:formRules="zzjgModal.formRules" :formData="zzjgModal.formData" :onSubmit="handleSubmitZzjg"
|
:formRules="zzjgModal.formRules"
|
||||||
@success="handleSubmitZzjgSuccess"></AntFormModal>
|
:formData="zzjgModal.formData"
|
||||||
|
:onSubmit="handleSubmitZzjg"
|
||||||
|
@success="handleSubmitZzjgSuccess"
|
||||||
|
></AntFormModal>
|
||||||
<AntFormModal
|
<AntFormModal
|
||||||
:visible.sync="zzryModal.visible"
|
:visible.sync="zzryModal.visible"
|
||||||
:title="zzryModal.title"
|
:title="zzryModal.title"
|
||||||
:formItems="zzryModal.formItems"
|
:formItems="zzryModal.formItems"
|
||||||
:formRules="zzryModal.formRules" :formData="zzryModal.formData" :onSubmit="handleSubmitZzry"
|
:formRules="zzryModal.formRules"
|
||||||
@success="handleSubmitZzrySuccess"></AntFormModal>
|
:formData="zzryModal.formData"
|
||||||
|
:onSubmit="handleSubmitZzry"
|
||||||
|
@success="handleSubmitZzrySuccess"
|
||||||
|
></AntFormModal>
|
||||||
<AntFormModal
|
<AntFormModal
|
||||||
:visible.sync="zzzbModal.visible"
|
:visible.sync="zzzbModal.visible"
|
||||||
:title="zzzbModal.title"
|
:title="zzzbModal.title"
|
||||||
:formItems="zzzbFormItems"
|
:formItems="zzzbFormItems"
|
||||||
:formRules="zzzbModal.formRules" :formData="zzzbModal.formData" :onSubmit="handleSubmitZzzb"
|
:formRules="zzzbModal.formRules"
|
||||||
@success="handleSubmitZzzbSuccess"></AntFormModal>
|
:formData="zzzbModal.formData"
|
||||||
|
:onSubmit="handleSubmitZzzb"
|
||||||
|
@success="handleSubmitZzzbSuccess"
|
||||||
|
></AntFormModal>
|
||||||
<!-- 组织物资模态框 -->
|
<!-- 组织物资模态框 -->
|
||||||
<AntFormModal
|
<AntFormModal
|
||||||
:visible.sync="zzwzModal.visible"
|
:visible.sync="zzwzModal.visible"
|
||||||
:title="zzwzModal.title"
|
:title="zzwzModal.title"
|
||||||
:formItems="zzwzFormItems"
|
:formItems="zzwzFormItems"
|
||||||
:formRules="zzwzModal.formRules" :formData="zzwzModal.formData" :onSubmit="handleSubmitZzwz"
|
:formRules="zzwzModal.formRules"
|
||||||
@success="handleSubmitZzwzSuccess"></AntFormModal>
|
:formData="zzwzModal.formData"
|
||||||
|
:onSubmit="handleSubmitZzwz"
|
||||||
|
@success="handleSubmitZzwzSuccess"
|
||||||
|
></AntFormModal>
|
||||||
</page-header-wrapper>
|
</page-header-wrapper>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -167,10 +205,11 @@ export default {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
table: {},
|
table: {},
|
||||||
immediate: false,
|
immediate: false,
|
||||||
query: () =>
|
query: (params) =>
|
||||||
this.$http({
|
this.$http({
|
||||||
url: `/baseData/fightPowerHierarchy/staff/${this.zzjg.selectedKeys[0]}`,
|
url: `/baseData/fightPowerHierarchy/staff/${this.zzjg.selectedKeys[0]}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params,
|
||||||
}),
|
}),
|
||||||
columns: [
|
columns: [
|
||||||
{ dataIndex: 'serial' },
|
{ dataIndex: 'serial' },
|
||||||
|
|
@ -215,10 +254,11 @@ export default {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
table: {},
|
table: {},
|
||||||
immediate: false,
|
immediate: false,
|
||||||
query: () =>
|
query: (params) =>
|
||||||
this.$http({
|
this.$http({
|
||||||
url: `/baseData/fightPowerHierarchy/weapon/${this.zzjg.selectedKeys[0]}`,
|
url: `/baseData/fightPowerHierarchy/weapon/${this.zzjg.selectedKeys[0]}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params,
|
||||||
}),
|
}),
|
||||||
columns: [
|
columns: [
|
||||||
{ dataIndex: 'serial' },
|
{ dataIndex: 'serial' },
|
||||||
|
|
@ -262,10 +302,11 @@ export default {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
table: {},
|
table: {},
|
||||||
immediate: false,
|
immediate: false,
|
||||||
query: () =>
|
query: (params) =>
|
||||||
this.$http({
|
this.$http({
|
||||||
url: `baseData/fightPowerHierarchy/supplier/getByOrgId?id=${this.zzjg.selectedKeys[0]}`, // 修改为material
|
url: `baseData/fightPowerHierarchy/supplier/getByOrgId?id=${this.zzjg.selectedKeys[0]}`, // 修改为material
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params,
|
||||||
}),
|
}),
|
||||||
columns: [
|
columns: [
|
||||||
{ dataIndex: 'serial' },
|
{ dataIndex: 'serial' },
|
||||||
|
|
@ -318,18 +359,18 @@ export default {
|
||||||
return [
|
return [
|
||||||
this.zzzbModal.mode === 'add'
|
this.zzzbModal.mode === 'add'
|
||||||
? {
|
? {
|
||||||
label: '装备名称',
|
label: '装备名称',
|
||||||
prop: 'weaponId',
|
prop: 'weaponId',
|
||||||
component: 'AntOriginTreeSelect',
|
component: 'AntOriginTreeSelect',
|
||||||
options: {
|
options: {
|
||||||
dataSource: () =>
|
dataSource: () =>
|
||||||
this.$http({
|
this.$http({
|
||||||
url: '/tree/armament',
|
url: '/tree/armament',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
}),
|
}),
|
||||||
readonly: false,
|
readonly: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: { label: '装备名称', prop: 'name', customRender: (v) => v },
|
: { label: '装备名称', prop: 'name', customRender: (v) => v },
|
||||||
{ label: '装备数量', prop: 'number' },
|
{ label: '装备数量', prop: 'number' },
|
||||||
]
|
]
|
||||||
|
|
@ -338,19 +379,19 @@ export default {
|
||||||
return [
|
return [
|
||||||
this.zzwzModal.mode === 'add'
|
this.zzwzModal.mode === 'add'
|
||||||
? {
|
? {
|
||||||
label: '物资名称',
|
label: '物资名称',
|
||||||
prop: 'supplierId',
|
prop: 'supplierId',
|
||||||
component: 'AntOriginTreeSelect',
|
component: 'AntOriginTreeSelect',
|
||||||
options: {
|
options: {
|
||||||
dataSource: () =>
|
dataSource: () =>
|
||||||
this.$http({
|
this.$http({
|
||||||
url: '/suppliesDict/tree',
|
url: '/suppliesDict/tree',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
}),
|
}),
|
||||||
valueKey: 'key',
|
valueKey: 'key',
|
||||||
readonly: false,
|
readonly: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: { label: '物资名称', prop: 'name', customRender: (v) => v },
|
: { label: '物资名称', prop: 'name', customRender: (v) => v },
|
||||||
{ label: '物资数量', prop: 'account' },
|
{ label: '物资数量', prop: 'account' },
|
||||||
]
|
]
|
||||||
|
|
@ -419,7 +460,7 @@ export default {
|
||||||
})
|
})
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
this.getZzTree()
|
this.getZzTree()
|
||||||
} catch (error) { }
|
} catch (error) {}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleOpenAddZzryModal() {
|
handleOpenAddZzryModal() {
|
||||||
|
|
@ -470,7 +511,6 @@ export default {
|
||||||
this.$refs['zzzb-table'].commitAction('query')
|
this.$refs['zzzb-table'].commitAction('query')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
handleOpenAddZzwzModal() {
|
handleOpenAddZzwzModal() {
|
||||||
this.zzwzModal.title = '新建组织物资' // 修改标题
|
this.zzwzModal.title = '新建组织物资' // 修改标题
|
||||||
this.zzwzModal.mode = 'add'
|
this.zzwzModal.mode = 'add'
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,11 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getRoomList()
|
this.getRoomList()
|
||||||
|
|
||||||
|
window.addEventListener('beforeunload', (e) => {
|
||||||
|
this.closeWebsocket()
|
||||||
|
return true
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.closeWebsocket()
|
this.closeWebsocket()
|
||||||
|
|
@ -252,6 +257,7 @@ export default {
|
||||||
},
|
},
|
||||||
closeWebsocket() {
|
closeWebsocket() {
|
||||||
this.ws && this.ws.close()
|
this.ws && this.ws.close()
|
||||||
|
this.ws = null
|
||||||
},
|
},
|
||||||
async getRoomDetail() {
|
async getRoomDetail() {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,11 @@ 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.initWebsocket()
|
this.initWebsocket()
|
||||||
|
|
||||||
|
window.addEventListener('beforeunload', (e) => {
|
||||||
|
this.closeWebsocket()
|
||||||
|
return true
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.cesium = new window.MyCesium('display-cesium-container')
|
this.cesium = new window.MyCesium('display-cesium-container')
|
||||||
|
|
@ -67,6 +72,7 @@ export default {
|
||||||
},
|
},
|
||||||
closeWebsocket() {
|
closeWebsocket() {
|
||||||
this.ws && this.ws.close()
|
this.ws && this.ws.close()
|
||||||
|
this.ws = null
|
||||||
},
|
},
|
||||||
async getZzbzllTreeData(initPlot = false) {
|
async getZzbzllTreeData(initPlot = false) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -305,6 +305,11 @@ 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.initWebsocket()
|
this.initWebsocket()
|
||||||
|
|
||||||
|
window.addEventListener('beforeunload', (e) => {
|
||||||
|
this.closeWebsocket()
|
||||||
|
return true
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.cesium = new window.MyCesium('model-cesium-container')
|
this.cesium = new window.MyCesium('model-cesium-container')
|
||||||
|
|
@ -330,6 +335,7 @@ export default {
|
||||||
},
|
},
|
||||||
closeWebsocket() {
|
closeWebsocket() {
|
||||||
this.ws && this.ws.close()
|
this.ws && this.ws.close()
|
||||||
|
this.ws = null
|
||||||
},
|
},
|
||||||
getTree(target, treeData, checkedKeys) {
|
getTree(target, treeData, checkedKeys) {
|
||||||
treeData.forEach((item) => {
|
treeData.forEach((item) => {
|
||||||
|
|
@ -484,6 +490,9 @@ export default {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
::v-deep {
|
::v-deep {
|
||||||
|
.distance-legend {
|
||||||
|
left: 320px;
|
||||||
|
}
|
||||||
.compass {
|
.compass {
|
||||||
right: 320px;
|
right: 320px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,11 @@ 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.initWebsocket()
|
this.initWebsocket()
|
||||||
|
|
||||||
|
window.addEventListener('beforeunload', (e) => {
|
||||||
|
this.closeWebsocket()
|
||||||
|
return true
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.cesium = new window.MyCesium('scene-cesium-container')
|
this.cesium = new window.MyCesium('scene-cesium-container')
|
||||||
|
|
@ -312,6 +317,7 @@ export default {
|
||||||
},
|
},
|
||||||
closeWebsocket() {
|
closeWebsocket() {
|
||||||
this.ws && this.ws.close()
|
this.ws && this.ws.close()
|
||||||
|
this.ws = null
|
||||||
},
|
},
|
||||||
getTree(target, treeData, checkedKeys) {
|
getTree(target, treeData, checkedKeys) {
|
||||||
treeData.forEach((item) => {
|
treeData.forEach((item) => {
|
||||||
|
|
@ -387,6 +393,34 @@ export default {
|
||||||
console.log(error)
|
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 }) {
|
handleSelectZzbzll(selectedKeys, { node }) {
|
||||||
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
|
||||||
|
|
@ -473,6 +507,9 @@ export default {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
::v-deep {
|
::v-deep {
|
||||||
|
.distance-legend {
|
||||||
|
left: 320px;
|
||||||
|
}
|
||||||
.compass {
|
.compass {
|
||||||
right: 320px;
|
right: 320px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -356,6 +356,34 @@ export default {
|
||||||
console.log(error)
|
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 }) {
|
handleSelectZzbzll(selectedKeys, { node }) {
|
||||||
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
|
||||||
|
|
@ -442,6 +470,9 @@ export default {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
::v-deep {
|
::v-deep {
|
||||||
|
.distance-legend {
|
||||||
|
left: 320px;
|
||||||
|
}
|
||||||
.compass {
|
.compass {
|
||||||
right: 320px;
|
right: 320px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ const GitRevisionPlugin = require('git-revision-webpack-plugin')
|
||||||
const GitRevision = new GitRevisionPlugin()
|
const GitRevision = new GitRevisionPlugin()
|
||||||
const buildDate = JSON.stringify(new Date().toLocaleString())
|
const buildDate = JSON.stringify(new Date().toLocaleString())
|
||||||
const createThemeColorReplacerPlugin = require('./config/plugin.config')
|
const createThemeColorReplacerPlugin = require('./config/plugin.config')
|
||||||
|
const port = process.env.VUE_APP_PORT || 8000
|
||||||
|
|
||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir)
|
||||||
|
|
@ -108,8 +109,8 @@ const vueConfig = {
|
||||||
|
|
||||||
devServer: {
|
devServer: {
|
||||||
// development server port 8000
|
// development server port 8000
|
||||||
port: 8000,
|
port,
|
||||||
public: os.networkInterfaces().以太网?.slice(-1)[0].address + ':8000',
|
public: os.networkInterfaces().以太网?.slice(-1)[0].address + ':' + port,
|
||||||
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
|
|
@ -134,7 +135,6 @@ const vueConfig = {
|
||||||
|
|
||||||
// disable source map in production
|
// disable source map in production
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
lintOnSave: undefined,
|
|
||||||
// babel-loader no-ignore node_modules/*
|
// babel-loader no-ignore node_modules/*
|
||||||
transpileDependencies: ['@cesium/widgets', '@cesium/engine'],
|
transpileDependencies: ['@cesium/widgets', '@cesium/engine'],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user