This commit is contained in:
2025-12-16 17:53:41 +08:00
parent b3aa4e4bba
commit 97ef6d2b69
34 changed files with 434 additions and 166 deletions

File diff suppressed because one or more lines are too long

View File

@ -33,7 +33,6 @@
src: url('../fonts/AlimamaShuHeiTi-Bold.ttf') format('truetype');
}
:root {
--color-base1: 0, 255, 255;
--color-sdk-auxiliary: 0, 66, 66;
@ -488,7 +487,6 @@
.YJ-custom-base-dialog>.content .table .table-body .tr:first-child {
border-top: none;
}
.YJ-custom-base-dialog>.content .table .table-body .tr:last-child {
border-bottom: 1px solid rgba(var(--color-base1), 0.5);
}
@ -588,6 +586,7 @@
}
.YJ-custom-base-dialog>.content .table .tr .td .link-edit {
min-height: 32px;
line-height: 18px;
@ -722,7 +721,6 @@
.YJ-custom-base-dialog>.content .input-number-unit input[type=number] {
padding: 0 16px 0 10px;
}
.YJ-custom-base-dialog>.content .input-number-unit input[type=number]::-webkit-outer-spin-button,
.YJ-custom-base-dialog>.content .input-number-unit input[type=number]::-webkit-inner-spin-button {
margin-left: 5px;
@ -1823,7 +1821,6 @@
border-color: rgba(var(--color-base1));
color: rgba(var(--color-base1));
}
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active svg {
fill: rgba(var(--color-base1));
}
@ -2094,7 +2091,6 @@
.YJ-custom-base-dialog.cut-fill>.content>div .div-item:last-child .row .unit {
margin-left: 5px;
}
.YJ-custom-base-dialog.cut-fill>.content .firstTip {
position: absolute;
left: 340px;
@ -2159,7 +2155,6 @@
flex: 0 0 60px;
justify-content: center;
}
.YJ-custom-base-dialog.submerge>.content .rangeWords {
font-size: 14px;
font-weight: 500;
@ -2321,7 +2316,6 @@
.YJ-custom-base-dialog.circle-view-shed>.content {
width: 290px;
}
.YJ-custom-base-dialog.circle-view-shed>.content .firstTip {
font-size: 14px;
font-weight: 700;
@ -3086,7 +3080,7 @@
}
/* 文本框 */
.popup-textarea {
.popup-textarea{
/* width: 212px; */
width: 161px;
/* height: 154px; */
@ -3099,30 +3093,28 @@
background-size: 100% 100%;
padding: 5px 5px 0px 5px;
}
.popup-textarea textarea {
.popup-textarea textarea{
width: 158px;
height: 95px;
background-color: unset !important;
border: unset !important;
background-color: unset!important;
border: unset!important;
color: #fff;
}
.popup-textarea textarea::-webkit-scrollbar {
width: 8px !important;
width: 8px!important;
/* height: 8px!important; */
}
.popup-textarea textarea::-webkit-scrollbar-thumb {
border-radius: 5px !important;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
background-color: rgba(var(--color-base1)) !important;
border-radius: 5px!important;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2)!important;
background-color: rgba(var(--color-base1))!important;
}
.popup-textarea textarea::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
border-radius: 5px !important;
background-color: rgba(var(--color-base1), 0.1) !important;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2)!important;
border-radius: 5px!important;
background-color: rgba(var(--color-base1), 0.1)!important;
}
/* 贴地图片 */
@ -3502,7 +3494,7 @@
.YJ-custom-checkbox-left:checked::after,
.YJ-custom-checkbox-right:checked::after {
content: "";
content: "\2714";
background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1);
width: 25px;
@ -3537,7 +3529,7 @@
}
.YJ-custom-base-dialog>.content input.YJ-custom-checkbox[type=checkbox]:checked::after {
content: "";
content: "\2714";
background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1);
width: 12px;
@ -3716,16 +3708,12 @@
border: 1px solid rgba(var(--color-base1), 0.5);
border-right: none;
}
.billboard-attribute-box .table .tr .th,
.billboard-attribute-box .table .tr .td {
.billboard-attribute-box .table .tr .th, .billboard-attribute-box .table .tr .td {
border-right: 1px solid rgba(var(--color-base1), 0.5);
display: flex;
justify-content: center;
}
.billboard-attribute-box .table .tr .th:last-child,
.billboard-attribute-box .table .tr .td:last-child {
.billboard-attribute-box .table .tr .th:last-child, .billboard-attribute-box .table .tr .td:last-child {
border-right: none;
}
@ -3773,18 +3761,19 @@
#YJ-custom-message.success {
/* background-color: #f0f9eb;
color: rgb(82, 196, 26); */
background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
linear-gradient(0deg, rgba(27, 248, 195, 0.5) 0%, rgba(27, 248, 195, 0) 100%);
background:
linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
linear-gradient(0deg, rgba(27, 248, 195, 0.5) 0%, rgba(27, 248, 195, 0) 100%);
font-size: 14px !important;
font-weight: 500 !important;
color: rgba(27, 248, 195, 1);
}
#YJ-custom-message.warning {
/* background-color: #fdf6ec;
color: #e6a23c; */
background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
linear-gradient(0deg, rgba(255, 161, 69, 0.5) 0%, rgba(255, 161, 69, 0) 100%);
background:
linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
linear-gradient(0deg, rgba(255, 161, 69, 0.5) 0%, rgba(255, 161, 69, 0) 100%);
font-size: 14px !important;
font-weight: 500 !important;
color: rgba(255, 161, 69, 1)
@ -3883,4 +3872,4 @@
.yj-custom-icon.pic-line6 {
background: url(../../img/arrow/6.png) 100% 100% no-repeat;
background-size: 100% 100%;
}
}

View File

@ -163,10 +163,10 @@ export default {
version: '版本信息'
},
project: {
engineeringSettings: '工程设置',
engineeringSettings: '路网数据',
importRoadNetwork: '路网导入',
locationData: '地点数据',
importPOLI: 'POLI导入',
importPOLI: 'POIL导入',
engineeringData: '工程数据',
engineeringOverrideImport: '工程覆盖导入',
engineeringMergeImports: '工程合并导入',
@ -353,7 +353,7 @@ export default {
},
},
},
// 态势部分
// 态势部分
ts: {
historyDeduce: "历史推演",
deduceName: "推演名称",

View File

@ -11,7 +11,8 @@ export const LoginApi = {
logout: async () => {
return await request.post({
url: `/user/logout`,
})
}
}

View File

@ -13,4 +13,10 @@ export const AuthApi = {
url: `/auth/info`
})
},
authImport: async (data) => {
return await request.post({
url: `/auth/import`,
data: data
})
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

View File

@ -1,5 +1,6 @@
import theme from "@/utils/theme";
export const sysChange = async (eventBus) => {
import { set } from "date-fns";
export const sysChange = async (eventBus, isFirst) => {
let systemSetting = JSON.parse(localStorage.getItem("systemSetting") || '{}')
const obj = {
@ -31,7 +32,11 @@ export const sysChange = async (eventBus) => {
YJ.Global.setDMS(window.earth, systemSetting.positionType)
//比例尺
await YJ.Global.SheetIndexStatusSwitch(window.earth, systemSetting.sheetIndexStatusSwitch)
console.log(systemSetting.sheetIndexStatusSwitch, window.earth, '标准图幅')
setTimeout(async () => {
await YJ.Global.SheetIndexStatusSwitch(window.earth, systemSetting.sheetIndexStatusSwitch)
}, isFirst ? 1000 : 0)
eventBus.emit('tufuInput', systemSetting.sheetIndexStatusSwitch)
//鹰眼图

View File

@ -74,7 +74,8 @@
</div>
</template>
<template #footer>
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
<!-- <uploadFiles accept=".YJ" :maxSize="1"></uploadFiles> -->
<button @click="importAuth">授权导入</button>
<button @click="close">退出系统</button>
</template>
</Dialog>
@ -362,6 +363,25 @@ const copy = async (text) => {
ElMessage.error('复制失败')
}
}
function importAuth() {
// importWin = true
let option = {
properties: ['openFile'],
filters: [{ name: '授权文件', extensions: ['YJ'] }]
}
$sendElectronChanel('open-directory-dialog', option)
$recvElectronChanel('selectedItem', (e, paths) => {
console.log(paths, 'paths')
let formdata = new FormData()
formdata.append('filePath', paths[0])
try {
let res = AuthApi.authImport(formdata)
ElMessage.success('文件授权成功')
getAuthInfo()
} catch (error) {}
})
}
</script>
<style scoped lang="scss">
.rightBox {

View File

@ -49,7 +49,15 @@
{{ t('auths.noAuthexpire') }}
</div>
</div>
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
<!-- <uploadFiles accept=".YJ" :maxSize="1"></uploadFiles> -->
<el-button
@click="importAuth"
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5); width: 90px"
>
<span>{{ t('auths.upload') }}</span>
</el-button>
</div>
</template>
@ -59,6 +67,11 @@ import uploadFiles from '@/components/upload/uploadFiles.vue'
import { AuthApi } from '@/api/setting/auth'
import useClipboard from 'vue-clipboard3'
import { ElMessage, ElMessageBox } from 'element-plus'
import {
$sendElectronChanel,
$recvElectronChanel,
$changeComponentShow
} from '@/utils/communication'
const eventBus: any = inject('bus')
const { t } = useI18n()
@ -84,6 +97,24 @@ onUnmounted(() => {
eventBus.off('upload', func)
})
function importAuth() {
// importWin = true
let option = {
properties: ['openFile'],
filters: [{ name: '授权文件', extensions: ['YJ'] }]
}
$sendElectronChanel('open-directory-dialog', option)
$recvElectronChanel('selectedItem', (e, paths) => {
let formdata = new FormData()
formdata.append('filePath', paths[0])
try {
let res = AuthApi.authImport(formdata)
ElMessage.success('文件授权成功')
getAuthInfo()
} catch (error) {}
})
}
// eventBus.on('upload', (data) => {
// if (data) {
// getAuthInfo()

View File

@ -32,7 +32,7 @@
<div class="item_left">
<div class="img">
<img
src="../../../../../../assets/images/pdf.png"
src="../../../../../../assets/images/pbfl.png"
style="width: 40px; height: 50px"
/>
</div>
@ -88,7 +88,7 @@
<div class="item_left">
<div class="img">
<img
src="../../../../../../assets/images/poi.png"
src="../../../../../../assets/images/poil.png"
style="width: 40px; height: 50px"
/>
</div>

View File

@ -105,6 +105,7 @@ import {
$recvElectronChanel,
$removeElectronChanel
} from '@/utils/communication'
import { set } from 'date-fns'
const eventBus: any = inject('bus')
@ -258,7 +259,15 @@ const attachUpload = async () => {
}
})
}
let isClick = true
const downloadTemp = async () => {
if (!isClick) {
return
}
isClick = false
setTimeout(() => {
isClick = true
}, 1000)
let p = 'xlsx'
if (process.platform == 'linux') {
p = 'et'

View File

@ -258,6 +258,7 @@ watch(photoName, (val) => {
// treeRef.value!.filter(val)
// }
modelList.value = []
currModelList.value = []
getModelList()
})
const filterNode: any = (value, data) => {
@ -401,7 +402,8 @@ const handleFileChange = (e: Event) => {
}
//创建模型库
const createModelDB = async () => {
let date = new Date().toISOString().split('T')[0]
// let date = new Date().toISOString().split('T')[0]
let date = getCurrentDateFormatted()
let option = {
title: '创建军标库',
// filename: 'YJEarth.junbiao',
@ -423,6 +425,13 @@ const createModelDB = async () => {
}
})
}
function getCurrentDateFormatted() {
const now = new Date()
const year = now.getFullYear()
const month = String(now.getMonth() + 1).padStart(2, '0')
const day = String(now.getDate()).padStart(2, '0')
return `${year}${month}${day}`
}
//导入模型库
const importModelDB = () => {
@ -891,24 +900,24 @@ const handleDelete = (row: any) => {
type: 'warning'
}
)
.then(() => {
let formData = new FormData()
formData.append('militaryId', row.id)
GraphApi.delModel(formData).then((res) => {
if (res.code == 0 || res.code == 200) {
getModelListByType(row.militaryTypeId)
ElMessage.success('删除成功')
if (res.data?.length) {
//删除对应的树数据和地图数据
res.data.forEach((item) => {
let node = window.treeObj.getNodeByParam('id', item, null)
let source_ids = cusRemoveNode(window.treeObj, [node])
;(window as any).earth.entityMap.get(source_ids[0]).remove()
;(window as any)._entityMap.delete(item)
})
}
.then(async () => {
try {
let formData = new FormData()
formData.append('militaryId', row.id)
let res = await GraphApi.delModel(formData)
getModelListByType(row.militaryTypeId)
ElMessage.success('删除成功')
if (res.data?.length) {
//删除对应的树数据和地图数据
res.data.forEach((item) => {
let node = window.treeObj.getNodeByParam('id', item, null)
let source_ids = cusRemoveNode(window.treeObj, [node])
;(window as any).earth.entityMap.get(source_ids[0]).remove()
;(window as any)._entityMap.delete(item)
})
}
})
} catch (error) {}
})
.catch(() => {})
}

View File

@ -286,6 +286,7 @@ watch(photoName, (val) => {
// }
getModelList()
modelList.value = []
currModelList.value = []
})
const filterNode: any = (value, data) => {
if (!value) return true
@ -448,7 +449,8 @@ const handleFileChange = (e: Event) => {
//创建模型库
const createModelDB = async () => {
let date = new Date().toISOString().split('T')[0]
// let date = new Date().toISOString().split('T')[0]
let date = getCurrentDateFormatted()
let option = {
title: '创建模型库',
// filename: 'YJEarth.model',
@ -470,6 +472,13 @@ const createModelDB = async () => {
}
})
}
function getCurrentDateFormatted() {
const now = new Date()
const year = now.getFullYear()
const month = String(now.getMonth() + 1).padStart(2, '0')
const day = String(now.getDate()).padStart(2, '0')
return `${year}${month}${day}`
}
//导入模型库
const importModelDB = () => {
@ -838,16 +847,15 @@ const handleEdit = (row: ModelItem) => {
updatePoster(row)
}
const updatePoster1 = (row, flag = false, path = '') => {
let cb = (c) => {
const formData = new FormData()
formData.append('modelId', row.id)
formData.append('file', c)
ModelApi.updatePoster(formData).then((res) => {
if (res.code == 0 || res.code == 200) {
getModelListByType(row.modelTypeId)
ElMessage.success('添加成功')
}
})
let cb = async (c) => {
try {
const formData = new FormData()
formData.append('modelId', row.id)
formData.append('file', c)
let res = await ModelApi.updatePoster(formData)
getModelListByType(row.modelTypeId)
ElMessage.success('更换成功')
} catch (error) {}
}
if (!flag) {
let option = {
@ -872,16 +880,16 @@ const updatePoster1 = (row, flag = false, path = '') => {
const updatePoster = (row, flag = false, path = '') => {
let that = this
let cb = (c) => {
const formData = new FormData()
formData.append('modelId', row.id)
formData.append('file', c)
ModelApi.updatePoster(formData).then((res) => {
if (res.code == 0 || res.code == 200) {
getModelListByType(row.modelTypeId)
ElMessage.success('添加成功')
}
})
let cb = async (c) => {
try {
const formData = new FormData()
formData.append('modelId', row.id)
formData.append('file', c)
let res = await ModelApi.updatePoster(formData)
getModelListByType(row.modelTypeId)
ElMessage.success('更换成功')
} catch (error) {}
}
if (!flag) {
let option = {
@ -945,26 +953,25 @@ const handleDelete = (row: ModelItem) => {
type: 'warning'
}
)
.then(() => {
let formData = new FormData()
formData.append('modelId', row.id)
ModelApi.delModel(formData).then((res) => {
if (res.code == 0 || res.code == 200) {
// @ts-ignore
getModelListByType(row.modelTypeId)
ElMessage.success('删除成功')
.then(async () => {
try {
let formData = new FormData()
formData.append('modelId', row.id)
let res = await ModelApi.delModel(formData)
// @ts-ignore
getModelListByType(row.modelTypeId)
ElMessage.success('删除成功')
if (res.data?.length) {
//删除对应的树数据和地图数据
res.data.forEach((item) => {
let node = window.treeObj.getNodeByParam('id', item, null)
let source_ids = cusRemoveNode(window.treeObj, [node])
;(window as any).earth.entityMap.get(source_ids[0]).remove()
;(window as any)._entityMap.delete(item)
})
}
if (res.data?.length) {
//删除对应的树数据和地图数据
res.data.forEach((item) => {
let node = window.treeObj.getNodeByParam('id', item, null)
let source_ids = cusRemoveNode(window.treeObj, [node])
;(window as any).earth.entityMap.get(source_ids[0]).remove()
;(window as any)._entityMap.delete(item)
})
}
})
} catch (error) {}
})
.catch(() => {})
}

View File

@ -292,6 +292,7 @@ watch(photoName, (val) => {
// treeRef.value!.filter(val)
// }
getModelList()
modelList.value = []
currModelList.value = []
})
const filterNode: any = (value, data) => {
@ -483,7 +484,8 @@ const handleFileChange = (e: Event) => {
}
//创建模型库
const createModelDB = async () => {
let date = new Date().toISOString().split('T')[0]
// let date = new Date().toISOString().split('T')[0]
let date = getCurrentDateFormatted()
let option = {
title: '创建图标库',
// filename: 'YJEarth.tubiao',
@ -505,6 +507,13 @@ const createModelDB = async () => {
}
})
}
function getCurrentDateFormatted() {
const now = new Date()
const year = now.getFullYear()
const month = String(now.getMonth() + 1).padStart(2, '0')
const day = String(now.getDate()).padStart(2, '0')
return `${year}${month}${day}`
}
//导入模型库
const importModelDB = () => {
@ -970,15 +979,15 @@ const handleDelete = (row: any) => {
type: 'warning'
}
)
.then(() => {
let formData = new FormData()
formData.append('iconId', row.id)
PhotoApi.delModel(formData).then((res) => {
if (res.code == 0 || res.code == 200) {
getModelListByType(row.iconTypeId)
ElMessage.success('删除成功')
}
})
.then(async () => {
try {
let formData = new FormData()
formData.append('iconId', row.id)
let res = await PhotoApi.delModel(formData)
getModelListByType(row.iconTypeId)
ElMessage.success('删除成功')
} catch (error) {}
})
.catch(() => {})
}

View File

@ -781,7 +781,7 @@ onMounted(() => {
.detailSkin {
width: 50%;
display: flex;
align-items: left;
align-items: center;
box-sizing: border-box;
flex-direction: row;
padding-bottom: 15px;

View File

@ -168,10 +168,37 @@ eventBus.on('contourDialog', () => {
})
const open = () => {
baseDialog.value?.open()
setVal()
setTimeout(() => {
YJ.Global.Contour(window.earth)
})
}
const setVal = () => {
//设置初始值
let material = window.earth.viewer.scene.globe.material
if (!material) {
return
}
let val = {
secondaryLinesCount: material.uniforms.secondaryLinesCount,
equalHeightDistance: material.uniforms.spacing / 5,
activeColor: material.uniforms.activeColor,
indexContourShow: material.uniforms.indexContourShow,
indexContourWidth: material.uniforms.indexContourWidth,
indexContourColor: material.uniforms.indexContourColor,
intermediateContourShow: material.uniforms.intermediateContourShow,
intermediateContourWidth: material.uniforms.intermediateContourWidth,
intermediateContourColor: material.uniforms.intermediateContourColor,
halfIntervalContourShow: material.uniforms.halfIntervalContourShow,
halfIntervalContourWidth: material.uniforms.halfIntervalContourWidth,
halfIntervalContourColor: material.uniforms.halfIntervalContourColor,
supplementaryContourShow: material.uniforms.supplementaryContourShow,
supplementaryContourWidth: material.uniforms.supplementaryContourWidth,
supplementaryContourColor: material.uniforms.supplementaryContourColor
}
YJ.Global.ContourSetVal(val)
}
const closeCallBack = (e) => {
YJ.Global.ContourReset()
show.value = true
@ -190,8 +217,7 @@ const sure = (e) => {
message: value,
type: 'error'
})
}
else {
} else {
baseDialog.value?.close()
}
}

View File

@ -489,8 +489,17 @@ const flyto = async (e) => {
})
return
}
if (window.earthPlaceMap === undefined) {
window.earthPlaceMap = new Map()
}
if (window.earthPlaceMap.size) {
window.earthPlaceMap.forEach((item) => {
item.remove()
})
window.earthPlaceMap.clear()
}
new YJ.Global.flyTo(window.earth, {
position: { lng: pointPosi.lng, lat: pointPosi.lat, alt: pointPosi.alt + 100 }
position: { lng: pointPosi.lng, lat: pointPosi.lat, alt: pointPosi.alt + 300 }
})
let name = '点标注'
let params = {
@ -574,4 +583,7 @@ defineExpose({
line-height: 0px;
text-shadow: 0px 0px 9px rgb(20, 118, 255);
}
::v-deep .content input[type='number'] {
font-size: 15px !important;
}
</style>

View File

@ -135,7 +135,7 @@
</div>
</div>
<div class="row">
<div class="col" style="flex: 0 0 300px">
<div class="col" style="flex: 0 0 350px">
<!-- <input
type="checkbox"
name="isTotalTime"

View File

@ -300,6 +300,7 @@ const open = () => {
const closeCallBack = (e) => {
status1.value = false
tools.projConvert(status1.value, () => {})
}
onBeforeUnmount(() => {
closeCallBack('')

View File

@ -6,11 +6,12 @@
style="z-index: 1000"
left="calc(50% - 160px)"
top="calc(50% - 120px)"
width="350px"
>
<template #content>
<el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef">
<el-form-item label="名称" prop="cameraName">
<el-input v-model.trim="addForm.cameraName" clearable placeholder="请输入设备名称"/>
<el-input v-model.trim="addForm.cameraName" clearable placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="设备IP" prop="ip">
<el-input v-model.trim="addForm.ip" clearable placeholder="请输入设备IP地址"></el-input>
@ -51,16 +52,16 @@
</template>
<script setup lang="ts">
import {ref} from 'vue'
import {inject} from 'vue'
import {TreeApi} from '@/api/tree'
import { ref } from 'vue'
import { inject } from 'vue'
import { TreeApi } from '@/api/tree'
import Dialog from '@/components/dialog/baseDialog.vue'
import {initMapData} from '../../../common/initMapData'
import {useTreeNode} from '../tree/hooks/treeNode'
import {deviceApi} from '@/api/deviceManage/index'
import {ElMessage, ElMessageBox} from 'element-plus'
import { initMapData } from '../../../common/initMapData'
import { useTreeNode } from '../tree/hooks/treeNode'
import { deviceApi } from '@/api/deviceManage/index'
import { ElMessage, ElMessageBox } from 'element-plus'
const {cusAddNodes} = useTreeNode()
const { cusAddNodes } = useTreeNode()
const baseDialog: any = ref(null)
const eventBus: any = inject('bus')
@ -79,10 +80,28 @@ var addForm: any = ref({
})
const peopleRules: any = reactive({
cameraName: [{required: true, message: '请输入名称', trigger: 'blur'}],
ip: [{required: true, message: '请输入ip', trigger: 'blur'}],
cameraName: [{ required: true, message: '请输入名称', trigger: 'blur' }],
ip: [
{ required: true, message: '请输入ip', trigger: 'blur' },
{
validator: (rule, value, callback) => {
const ipPattern = /^(\d{1,3}\.){3}\d{1,3}$/
if (!ipPattern.test(value)) {
callback(new Error('请输入有效的IP地址'))
} else {
const parts = value.split('.').map(Number)
if (parts.some((part) => part < 0 || part > 255)) {
callback(new Error('IP地址段必须在0-255之间'))
} else {
callback()
}
}
},
trigger: 'blur'
}
],
port: [
{required: true, message: '请输入设备端口号', trigger: 'blur'},
{ required: true, message: '请输入设备端口号', trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (!value) {
@ -111,10 +130,10 @@ const peopleRules: any = reactive({
trigger: 'blur'
}
],
username: [{required: true, message: '请输入用户名', trigger: 'blur'}],
password: [{required: true, message: '请输入密码', trigger: 'blur'}],
type: [{required: true, message: '请选择设备类型', trigger: 'blur'}],
channel: [{required: true, message: '请输入通道号', trigger: 'blur'}]
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
type: [{ required: true, message: '请选择设备类型', trigger: 'blur' }],
channel: [{ required: true, message: '请输入通道号', trigger: 'blur' }]
})
var cancel = () => {

View File

@ -219,9 +219,12 @@ let observer: IntersectionObserver | null = null
const treeRef: any = ref('')
watch(modelName, (val) => {
if (treeRef.value && treeRef.value !== '') {
treeRef.value!.filter(val)
}
// if (treeRef.value && treeRef.value !== '') {
// treeRef.value!.filter(val)
// }
categories.value = []
currModelList.value = []
getModelList()
})
watch(isShowPup, (val) => {
@ -435,6 +438,7 @@ const renderModel = async (model) => {
const getModelListByType = (id) => {
let formData = new FormData()
formData.append('militaryTypeId', id)
formData.append('name', modelName.value)
GraphApi.showModelByType(formData).then((res) => {
categories.value = res.data
@ -445,7 +449,9 @@ const getModelListByType = (id) => {
}
const getModelList = async () => {
const res: any = await GraphApi.modelTypeList()
const params = new URLSearchParams()
params.append('militaryName', modelName.value)
const res: any = await GraphApi.modelTypeList(params)
if (res.code == 0 || res.code == 200) {
let data = transformNestedJson(res.data, 'name', 'label')
typeTreeData.value = data

View File

@ -315,6 +315,7 @@ watch(modelName, (val) => {
// treeRef.value!.filter(val)
// }
categories.value = []
currModelList.value = []
getModelList()
})

View File

@ -98,7 +98,19 @@ var addForm: any = ref({
})
const peopleRules: any = reactive({
distance: [{ required: true, message: '请输入间距', trigger: 'blur' }]
distance: [
{ required: true, message: '请输入间距', trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (value < 0 || value === 0) {
callback(new Error('间距需大于0'))
} else {
callback()
}
},
trigger: 'blur'
}
]
})
var type: any = ref('point')

View File

@ -136,6 +136,7 @@ import { getdefaultStyle } from '../components/propertyBox/defaultStyle/style'
import { getdefaultLabelStyle } from '../components/propertyBox/defaultLabelStyle/style'
import { setEventBus } from './eventBus'
import router from '@renderer/router'
const { rightMenus } = useRightOperate()
const firstMenuRef = ref(null)
@ -150,7 +151,6 @@ let editdirectoryBox = ref()
setEventBus(eventBus)
// 标注标绘默认样式
if (!localStorage.getItem('defaultStyle')) {
let defaultStyle = getdefaultStyle(null)
@ -474,7 +474,7 @@ eventBus.on('destroyComponent', (id) => {
}
})
utilsSysChange(eventBus)
utilsSysChange(eventBus, 'first')
const createEarth = async () => {
window.earth = await new YJ.YJEarth('earthContainer')
@ -552,7 +552,10 @@ const uploadFile = (event) => {
}
const getAuthInfo = async () => {
const res = await AuthApi.showAuth()
if (typeof res.data === 'object') {
if (res.message == '未找到授权文件') {
router.push('/')
localStorage.removeItem('Authorization')
} else if (typeof res.data === 'object') {
let time = res.data.expireTime
getStatus(time)
}

View File

@ -27,31 +27,107 @@
<!-- 登录页面 -->
<div class="rightBox" v-if="isDesktop">
<el-button class="settings" size="small" @click="serviceDialog = true">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="42" height="40.67999267578125" viewBox="0 0 42 40.67999267578125" fill="none"><g><path d="M32.748 18C32.6078 17.2589 32.1562 16.776 31.596 16.776L31.584 16.776L31.476 16.776C29.8563 16.776 28.536 15.4559 28.536 13.836C28.536 13.3103 28.788 12.72 28.788 12.72C29.0783 12.0666 28.8579 11.2688 28.272 10.86L28.236 10.836L25.26 9.18L25.224 9.168C25.0301 9.0837 24.8127 9.036 24.588 9.036C24.1275 9.036 23.6739 9.21871 23.376 9.528C23.0494 9.86507 21.9261 10.824 21.06 10.824C20.1861 10.824 19.0599 9.84731 18.732 9.504C18.4325 9.18839 17.9732 9 17.508 9C17.2877 9 17.0746 9.0387 16.884 9.12L16.848 9.144L13.764 10.836L13.728 10.86C13.1402 11.2684 12.922 12.0669 13.212 12.72C13.212 12.72 13.464 13.3063 13.464 13.836C13.464 15.4559 12.1438 16.776 10.524 16.776L10.428 16.776L10.404 16.776C9.84445 16.776 9.39221 17.2588 9.252 18C9.252 18.0544 9 19.3442 9 20.352C9 21.3598 9.252 22.6495 9.252 22.704C9.39231 23.4452 9.84407 23.916 10.404 23.916L10.416 23.916L10.524 23.916C12.1438 23.916 13.464 25.2361 13.464 26.856C13.464 27.3823 13.212 27.972 13.212 27.972C12.922 28.6249 13.1424 29.4341 13.728 29.844L13.764 29.868L16.68 31.5L16.716 31.512C16.9098 31.5973 17.1284 31.644 17.352 31.644C17.819 31.644 18.2669 31.4511 18.564 31.128C18.9788 30.6773 20.1089 29.748 20.94 29.748C21.8399 29.748 22.995 30.787 23.328 31.152C23.6258 31.4807 24.0803 31.68 24.552 31.68C24.7712 31.68 24.9852 31.6424 25.176 31.56L25.212 31.536L28.236 29.868L28.272 29.844C28.8589 29.4351 29.0894 28.6356 28.8 27.984C28.8 27.984 28.536 27.3787 28.536 26.856C28.536 25.2361 29.8563 23.916 31.476 23.916L31.572 23.916L31.596 23.916C32.1571 23.916 32.608 23.4446 32.748 22.704C32.748 22.6909 33 21.385 33 20.352C33 19.3396 32.748 18.0542 32.748 18ZM17.364 29.952L14.808 28.524C14.9206 28.2349 15.144 27.5538 15.144 26.856C15.144 24.433 13.2855 22.4323 10.884 22.248C10.8254 21.9063 10.692 21.0321 10.692 20.352C10.692 19.6729 10.8254 18.798 10.884 18.456C13.2856 18.2719 15.144 16.2592 15.144 13.836C15.144 13.1401 14.9204 12.4692 14.808 12.18L17.532 10.692C17.63 10.7921 18.0227 11.1823 18.564 11.568C19.4485 12.1985 20.2834 12.516 21.06 12.516C21.829 12.516 22.6651 12.1983 23.544 11.58C24.0819 11.2016 24.4783 10.8264 24.576 10.728L27.192 12.18C27.0795 12.4692 26.856 13.1391 26.856 13.836C26.856 16.2592 28.7144 18.2719 31.116 18.456C31.1746 18.7985 31.308 19.6749 31.308 20.352C31.308 21.0318 31.1746 21.9062 31.116 22.248C28.7145 22.4321 26.856 24.4328 26.856 26.856C26.856 27.5527 27.0796 28.2229 27.192 28.512L24.54 29.988C24.4255 29.8664 24.0426 29.4611 23.508 29.064C22.6064 28.3945 21.7405 28.056 20.94 28.056C20.1472 28.056 19.2924 28.3951 18.396 29.052C17.8691 29.4383 17.4787 29.8324 17.364 29.952ZM25.2 20.328C25.2 17.9842 23.2957 16.08 20.952 16.08C18.6083 16.08 16.692 17.9842 16.692 20.328C16.692 22.6717 18.6083 24.588 20.952 24.588C23.2958 24.588 25.2 22.6717 25.2 20.328ZM20.952 17.772C22.3658 17.772 23.508 18.9142 23.508 20.328C23.508 21.7418 22.3658 22.896 20.952 22.896C19.5383 22.896 18.384 21.7418 18.384 20.328C18.384 18.9142 19.5383 17.772 20.952 17.772Z" fill="#FFFFFF"/></g><defs><filter id="filter_2442_1327" x="0" y="0" width="42" height="40.67999267578125" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="feFloodId_2442_1327"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha_2442_1327"/><feOffset dx="0" dy="0"/><feGaussianBlur stdDeviation="4.5"/><feComposite in2="hardAlpha_2442_1327" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.0784313725490196 0 0 0 0 0.4627450980392157 0 0 0 0 1 0 0 0 1 0"/><feBlend mode="normal" in2="feFloodId_2442_1327" result="dropShadow_1_2442_1327"/><feBlend mode="normal" in="SourceGraphic" in2="dropShadow_1_2442_1327" result="shape_2442_1327"/></filter></defs></svg>
</el-button>
<el-button class="exit" size="small" @click="goExit">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40" height="40"
viewBox="-8 -8 40 40" fill="none">
<g xmlns="http://www.w3.org/2000/svg">
<path xmlns="http://www.w3.org/2000/svg"
d="M15.8747 5.23095L16.8448 3.27277C16.9578 3.32908 17.0698 3.38736 17.1809 3.44758C17.2919 3.5078 17.4018 3.56992 17.5107 3.63395C17.6195 3.69799 17.7273 3.76389 17.8338 3.83167C17.9404 3.89944 18.0458 3.96904 18.15 4.04046C18.2541 4.1119 18.357 4.18512 18.4587 4.26012C18.5603 4.33512 18.6606 4.41186 18.7596 4.49034C18.8586 4.56881 18.9561 4.64899 19.0523 4.73086C19.1485 4.81273 19.2433 4.89624 19.3366 4.9814C19.4299 5.06657 19.5217 5.15332 19.612 5.24167C19.7023 5.33 19.791 5.41988 19.8782 5.51131C19.9654 5.60273 20.051 5.69563 20.1349 5.79003C20.2189 5.88443 20.3012 5.98026 20.3818 6.0775C20.4625 6.17474 20.5414 6.27335 20.6186 6.37335C20.6958 6.47335 20.7713 6.57465 20.8451 6.67726C20.9188 6.77986 20.9907 6.88372 21.0608 6.98884C21.1309 7.09395 21.1992 7.20024 21.2656 7.3077C21.3321 7.41516 21.3966 7.52375 21.4593 7.63347C21.522 7.74318 21.5827 7.85397 21.6415 7.96578C21.7004 8.07759 21.7573 8.1904 21.8122 8.3042C21.8671 8.41801 21.9201 8.53274 21.971 8.64836C22.0219 8.764 22.0709 8.88049 22.1178 8.99783C22.1647 9.11516 22.2096 9.23326 22.2524 9.35215C22.2952 9.47105 22.336 9.59066 22.3747 9.71096C22.4133 9.83126 22.4499 9.9522 22.4844 10.0738C22.5189 10.1954 22.5513 10.3175 22.5815 10.4402C22.6118 10.5629 22.6399 10.6861 22.6659 10.8097C22.6919 10.9334 22.7157 11.0575 22.7374 11.182C22.7591 11.3065 22.7786 11.4313 22.796 11.5565C22.8134 11.6817 22.8285 11.8071 22.8416 11.9329C22.8546 12.0586 22.8654 12.1845 22.8741 12.3105C22.8827 12.4366 22.8892 12.5628 22.8935 12.6891C22.8977 12.8154 22.8998 12.9418 22.8998 13.0681C22.8998 19.1053 18.0198 24.0002 11.9997 24.0002C5.97958 24.0002 1.09961 19.1053 1.09961 13.0681C1.09961 8.87354 3.47583 5.10551 7.15461 3.27277L8.12471 5.23095C8.03425 5.27602 7.9446 5.32264 7.8558 5.37081C7.76695 5.41898 7.67899 5.46868 7.59188 5.5199C7.50476 5.57114 7.41857 5.62386 7.33329 5.67807C7.24799 5.73229 7.16366 5.78797 7.08032 5.84511C6.99696 5.90225 6.91462 5.96083 6.83331 6.02084C6.75197 6.08085 6.67172 6.14224 6.59253 6.20503C6.51333 6.26781 6.43523 6.33196 6.35826 6.39746C6.28129 6.46294 6.20546 6.52975 6.13082 6.59789C6.05617 6.66603 5.98269 6.73543 5.91045 6.80612C5.8382 6.87679 5.76718 6.94869 5.69744 7.02184C5.62767 7.095 5.5592 7.16935 5.49201 7.24485C5.42482 7.32038 5.35896 7.39704 5.29443 7.47484C5.2299 7.55265 5.16672 7.63155 5.10495 7.71155C5.04313 7.79156 4.98273 7.87261 4.92377 7.95471C4.86478 8.03681 4.80722 8.11991 4.75112 8.204C4.69502 8.2881 4.64038 8.37314 4.58724 8.45912C4.53405 8.54511 4.48239 8.63199 4.43227 8.71977C4.3821 8.80755 4.33348 8.89619 4.28642 8.98566C4.23934 9.07512 4.19381 9.16538 4.14987 9.25643C4.10591 9.34748 4.06355 9.43927 4.0228 9.5318C3.98203 9.62433 3.94287 9.71753 3.90534 9.81139C3.86778 9.90528 3.83186 9.99978 3.79761 10.0949C3.76332 10.19 3.73072 10.2857 3.69979 10.382C3.66882 10.4782 3.63956 10.575 3.61197 10.6723C3.58436 10.7695 3.55846 10.8673 3.53426 10.9654C3.51004 11.0636 3.48753 11.1622 3.46674 11.2611C3.44594 11.3601 3.42687 11.4594 3.40951 11.559C3.39216 11.6586 3.37653 11.7585 3.36263 11.8587C3.34875 11.9588 3.3366 12.0592 3.32618 12.1598C3.31577 12.2603 3.3071 12.3611 3.30017 12.4619C3.29324 12.5628 3.28806 12.6638 3.28464 12.7649C3.28122 12.866 3.27955 12.967 3.27963 13.0681C3.27963 17.8987 7.18404 21.814 11.9997 21.814C16.8153 21.814 20.7197 17.8976 20.7197 13.0681C20.7198 12.967 20.7181 12.866 20.7147 12.7649C20.7113 12.6638 20.7061 12.5628 20.6992 12.4619C20.6922 12.3611 20.6836 12.2603 20.6732 12.1598C20.6628 12.0592 20.6506 11.9588 20.6367 11.8587C20.6228 11.7585 20.6072 11.6586 20.5898 11.559C20.5725 11.4594 20.5534 11.3601 20.5326 11.2611C20.5118 11.1622 20.4893 11.0636 20.4651 10.9654C20.4409 10.8673 20.415 10.7696 20.3874 10.6723C20.3598 10.575 20.3305 10.4782 20.2996 10.382C20.2686 10.2857 20.236 10.19 20.2018 10.0949C20.1675 9.99978 20.1316 9.90528 20.0941 9.81139C20.0565 9.71753 20.0173 9.62433 19.9766 9.5318C19.9358 9.43927 19.8934 9.34748 19.8495 9.25643C19.8056 9.16538 19.76 9.07512 19.7129 8.98566C19.6659 8.89619 19.6172 8.80755 19.5671 8.71977C19.5169 8.63199 19.4653 8.54511 19.4122 8.45912C19.359 8.37314 19.3043 8.2881 19.2482 8.204C19.1921 8.11991 19.1346 8.03681 19.0756 7.95471C19.0166 7.87261 18.9562 7.79156 18.8944 7.71155C18.8326 7.63155 18.7695 7.55265 18.7049 7.47484C18.6404 7.39704 18.5745 7.32038 18.5074 7.24485C18.4402 7.16935 18.3717 7.095 18.302 7.02184C18.2322 6.94869 18.1612 6.87679 18.0889 6.80612C18.0167 6.73543 17.9432 6.66603 17.8686 6.59789C17.7939 6.52975 17.7181 6.46294 17.6411 6.39746C17.5641 6.33196 17.486 6.26781 17.4068 6.20503C17.3276 6.14224 17.2474 6.08085 17.1661 6.02084C17.0847 5.96083 17.0024 5.90225 16.919 5.84511C16.8357 5.78797 16.7514 5.73229 16.6661 5.67807C16.5808 5.62386 16.4946 5.57114 16.4075 5.5199C16.3204 5.46868 16.2324 5.41898 16.1436 5.37081C16.0547 5.32264 15.9651 5.27602 15.8747 5.23095Z"
fill="#FFFFFF" />
<path xmlns="http://www.w3.org/2000/svg" d="M10.9102 0L13.0902 0L13.0902 8.72736L10.9102 8.72736L10.9102 0Z"
fill="#FFFFFF" />
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="42"
height="40.67999267578125"
viewBox="0 0 42 40.67999267578125"
fill="none"
>
<g>
<path
d="M32.748 18C32.6078 17.2589 32.1562 16.776 31.596 16.776L31.584 16.776L31.476 16.776C29.8563 16.776 28.536 15.4559 28.536 13.836C28.536 13.3103 28.788 12.72 28.788 12.72C29.0783 12.0666 28.8579 11.2688 28.272 10.86L28.236 10.836L25.26 9.18L25.224 9.168C25.0301 9.0837 24.8127 9.036 24.588 9.036C24.1275 9.036 23.6739 9.21871 23.376 9.528C23.0494 9.86507 21.9261 10.824 21.06 10.824C20.1861 10.824 19.0599 9.84731 18.732 9.504C18.4325 9.18839 17.9732 9 17.508 9C17.2877 9 17.0746 9.0387 16.884 9.12L16.848 9.144L13.764 10.836L13.728 10.86C13.1402 11.2684 12.922 12.0669 13.212 12.72C13.212 12.72 13.464 13.3063 13.464 13.836C13.464 15.4559 12.1438 16.776 10.524 16.776L10.428 16.776L10.404 16.776C9.84445 16.776 9.39221 17.2588 9.252 18C9.252 18.0544 9 19.3442 9 20.352C9 21.3598 9.252 22.6495 9.252 22.704C9.39231 23.4452 9.84407 23.916 10.404 23.916L10.416 23.916L10.524 23.916C12.1438 23.916 13.464 25.2361 13.464 26.856C13.464 27.3823 13.212 27.972 13.212 27.972C12.922 28.6249 13.1424 29.4341 13.728 29.844L13.764 29.868L16.68 31.5L16.716 31.512C16.9098 31.5973 17.1284 31.644 17.352 31.644C17.819 31.644 18.2669 31.4511 18.564 31.128C18.9788 30.6773 20.1089 29.748 20.94 29.748C21.8399 29.748 22.995 30.787 23.328 31.152C23.6258 31.4807 24.0803 31.68 24.552 31.68C24.7712 31.68 24.9852 31.6424 25.176 31.56L25.212 31.536L28.236 29.868L28.272 29.844C28.8589 29.4351 29.0894 28.6356 28.8 27.984C28.8 27.984 28.536 27.3787 28.536 26.856C28.536 25.2361 29.8563 23.916 31.476 23.916L31.572 23.916L31.596 23.916C32.1571 23.916 32.608 23.4446 32.748 22.704C32.748 22.6909 33 21.385 33 20.352C33 19.3396 32.748 18.0542 32.748 18ZM17.364 29.952L14.808 28.524C14.9206 28.2349 15.144 27.5538 15.144 26.856C15.144 24.433 13.2855 22.4323 10.884 22.248C10.8254 21.9063 10.692 21.0321 10.692 20.352C10.692 19.6729 10.8254 18.798 10.884 18.456C13.2856 18.2719 15.144 16.2592 15.144 13.836C15.144 13.1401 14.9204 12.4692 14.808 12.18L17.532 10.692C17.63 10.7921 18.0227 11.1823 18.564 11.568C19.4485 12.1985 20.2834 12.516 21.06 12.516C21.829 12.516 22.6651 12.1983 23.544 11.58C24.0819 11.2016 24.4783 10.8264 24.576 10.728L27.192 12.18C27.0795 12.4692 26.856 13.1391 26.856 13.836C26.856 16.2592 28.7144 18.2719 31.116 18.456C31.1746 18.7985 31.308 19.6749 31.308 20.352C31.308 21.0318 31.1746 21.9062 31.116 22.248C28.7145 22.4321 26.856 24.4328 26.856 26.856C26.856 27.5527 27.0796 28.2229 27.192 28.512L24.54 29.988C24.4255 29.8664 24.0426 29.4611 23.508 29.064C22.6064 28.3945 21.7405 28.056 20.94 28.056C20.1472 28.056 19.2924 28.3951 18.396 29.052C17.8691 29.4383 17.4787 29.8324 17.364 29.952ZM25.2 20.328C25.2 17.9842 23.2957 16.08 20.952 16.08C18.6083 16.08 16.692 17.9842 16.692 20.328C16.692 22.6717 18.6083 24.588 20.952 24.588C23.2958 24.588 25.2 22.6717 25.2 20.328ZM20.952 17.772C22.3658 17.772 23.508 18.9142 23.508 20.328C23.508 21.7418 22.3658 22.896 20.952 22.896C19.5383 22.896 18.384 21.7418 18.384 20.328C18.384 18.9142 19.5383 17.772 20.952 17.772Z"
fill="#FFFFFF"
/>
</g>
<defs>
<filter id="filter_2442_480" x="-10" y="-10" width="52.000244" height="53.800659"
filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<filter
id="filter_2442_1327"
x="0"
y="0"
width="42"
height="40.67999267578125"
filterUnits="userSpaceOnUse"
color-interpolation-filters="sRGB"
>
<feFlood flood-opacity="0" result="feFloodId_2442_1327" />
<feColorMatrix
in="SourceAlpha"
type="matrix"
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
result="hardAlpha_2442_1327"
/>
<feOffset dx="0" dy="0" />
<feGaussianBlur stdDeviation="4.5" />
<feComposite in2="hardAlpha_2442_1327" operator="out" />
<feColorMatrix
type="matrix"
values="0 0 0 0 0.0784313725490196 0 0 0 0 0.4627450980392157 0 0 0 0 1 0 0 0 1 0"
/>
<feBlend mode="normal" in2="feFloodId_2442_1327" result="dropShadow_1_2442_1327" />
<feBlend
mode="normal"
in="SourceGraphic"
in2="dropShadow_1_2442_1327"
result="shape_2442_1327"
/>
</filter>
</defs>
</svg>
</el-button>
<el-button class="exit" size="small" @click="goExit">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="40"
height="40"
viewBox="-8 -8 40 40"
fill="none"
>
<g xmlns="http://www.w3.org/2000/svg">
<path
xmlns="http://www.w3.org/2000/svg"
d="M15.8747 5.23095L16.8448 3.27277C16.9578 3.32908 17.0698 3.38736 17.1809 3.44758C17.2919 3.5078 17.4018 3.56992 17.5107 3.63395C17.6195 3.69799 17.7273 3.76389 17.8338 3.83167C17.9404 3.89944 18.0458 3.96904 18.15 4.04046C18.2541 4.1119 18.357 4.18512 18.4587 4.26012C18.5603 4.33512 18.6606 4.41186 18.7596 4.49034C18.8586 4.56881 18.9561 4.64899 19.0523 4.73086C19.1485 4.81273 19.2433 4.89624 19.3366 4.9814C19.4299 5.06657 19.5217 5.15332 19.612 5.24167C19.7023 5.33 19.791 5.41988 19.8782 5.51131C19.9654 5.60273 20.051 5.69563 20.1349 5.79003C20.2189 5.88443 20.3012 5.98026 20.3818 6.0775C20.4625 6.17474 20.5414 6.27335 20.6186 6.37335C20.6958 6.47335 20.7713 6.57465 20.8451 6.67726C20.9188 6.77986 20.9907 6.88372 21.0608 6.98884C21.1309 7.09395 21.1992 7.20024 21.2656 7.3077C21.3321 7.41516 21.3966 7.52375 21.4593 7.63347C21.522 7.74318 21.5827 7.85397 21.6415 7.96578C21.7004 8.07759 21.7573 8.1904 21.8122 8.3042C21.8671 8.41801 21.9201 8.53274 21.971 8.64836C22.0219 8.764 22.0709 8.88049 22.1178 8.99783C22.1647 9.11516 22.2096 9.23326 22.2524 9.35215C22.2952 9.47105 22.336 9.59066 22.3747 9.71096C22.4133 9.83126 22.4499 9.9522 22.4844 10.0738C22.5189 10.1954 22.5513 10.3175 22.5815 10.4402C22.6118 10.5629 22.6399 10.6861 22.6659 10.8097C22.6919 10.9334 22.7157 11.0575 22.7374 11.182C22.7591 11.3065 22.7786 11.4313 22.796 11.5565C22.8134 11.6817 22.8285 11.8071 22.8416 11.9329C22.8546 12.0586 22.8654 12.1845 22.8741 12.3105C22.8827 12.4366 22.8892 12.5628 22.8935 12.6891C22.8977 12.8154 22.8998 12.9418 22.8998 13.0681C22.8998 19.1053 18.0198 24.0002 11.9997 24.0002C5.97958 24.0002 1.09961 19.1053 1.09961 13.0681C1.09961 8.87354 3.47583 5.10551 7.15461 3.27277L8.12471 5.23095C8.03425 5.27602 7.9446 5.32264 7.8558 5.37081C7.76695 5.41898 7.67899 5.46868 7.59188 5.5199C7.50476 5.57114 7.41857 5.62386 7.33329 5.67807C7.24799 5.73229 7.16366 5.78797 7.08032 5.84511C6.99696 5.90225 6.91462 5.96083 6.83331 6.02084C6.75197 6.08085 6.67172 6.14224 6.59253 6.20503C6.51333 6.26781 6.43523 6.33196 6.35826 6.39746C6.28129 6.46294 6.20546 6.52975 6.13082 6.59789C6.05617 6.66603 5.98269 6.73543 5.91045 6.80612C5.8382 6.87679 5.76718 6.94869 5.69744 7.02184C5.62767 7.095 5.5592 7.16935 5.49201 7.24485C5.42482 7.32038 5.35896 7.39704 5.29443 7.47484C5.2299 7.55265 5.16672 7.63155 5.10495 7.71155C5.04313 7.79156 4.98273 7.87261 4.92377 7.95471C4.86478 8.03681 4.80722 8.11991 4.75112 8.204C4.69502 8.2881 4.64038 8.37314 4.58724 8.45912C4.53405 8.54511 4.48239 8.63199 4.43227 8.71977C4.3821 8.80755 4.33348 8.89619 4.28642 8.98566C4.23934 9.07512 4.19381 9.16538 4.14987 9.25643C4.10591 9.34748 4.06355 9.43927 4.0228 9.5318C3.98203 9.62433 3.94287 9.71753 3.90534 9.81139C3.86778 9.90528 3.83186 9.99978 3.79761 10.0949C3.76332 10.19 3.73072 10.2857 3.69979 10.382C3.66882 10.4782 3.63956 10.575 3.61197 10.6723C3.58436 10.7695 3.55846 10.8673 3.53426 10.9654C3.51004 11.0636 3.48753 11.1622 3.46674 11.2611C3.44594 11.3601 3.42687 11.4594 3.40951 11.559C3.39216 11.6586 3.37653 11.7585 3.36263 11.8587C3.34875 11.9588 3.3366 12.0592 3.32618 12.1598C3.31577 12.2603 3.3071 12.3611 3.30017 12.4619C3.29324 12.5628 3.28806 12.6638 3.28464 12.7649C3.28122 12.866 3.27955 12.967 3.27963 13.0681C3.27963 17.8987 7.18404 21.814 11.9997 21.814C16.8153 21.814 20.7197 17.8976 20.7197 13.0681C20.7198 12.967 20.7181 12.866 20.7147 12.7649C20.7113 12.6638 20.7061 12.5628 20.6992 12.4619C20.6922 12.3611 20.6836 12.2603 20.6732 12.1598C20.6628 12.0592 20.6506 11.9588 20.6367 11.8587C20.6228 11.7585 20.6072 11.6586 20.5898 11.559C20.5725 11.4594 20.5534 11.3601 20.5326 11.2611C20.5118 11.1622 20.4893 11.0636 20.4651 10.9654C20.4409 10.8673 20.415 10.7696 20.3874 10.6723C20.3598 10.575 20.3305 10.4782 20.2996 10.382C20.2686 10.2857 20.236 10.19 20.2018 10.0949C20.1675 9.99978 20.1316 9.90528 20.0941 9.81139C20.0565 9.71753 20.0173 9.62433 19.9766 9.5318C19.9358 9.43927 19.8934 9.34748 19.8495 9.25643C19.8056 9.16538 19.76 9.07512 19.7129 8.98566C19.6659 8.89619 19.6172 8.80755 19.5671 8.71977C19.5169 8.63199 19.4653 8.54511 19.4122 8.45912C19.359 8.37314 19.3043 8.2881 19.2482 8.204C19.1921 8.11991 19.1346 8.03681 19.0756 7.95471C19.0166 7.87261 18.9562 7.79156 18.8944 7.71155C18.8326 7.63155 18.7695 7.55265 18.7049 7.47484C18.6404 7.39704 18.5745 7.32038 18.5074 7.24485C18.4402 7.16935 18.3717 7.095 18.302 7.02184C18.2322 6.94869 18.1612 6.87679 18.0889 6.80612C18.0167 6.73543 17.9432 6.66603 17.8686 6.59789C17.7939 6.52975 17.7181 6.46294 17.6411 6.39746C17.5641 6.33196 17.486 6.26781 17.4068 6.20503C17.3276 6.14224 17.2474 6.08085 17.1661 6.02084C17.0847 5.96083 17.0024 5.90225 16.919 5.84511C16.8357 5.78797 16.7514 5.73229 16.6661 5.67807C16.5808 5.62386 16.4946 5.57114 16.4075 5.5199C16.3204 5.46868 16.2324 5.41898 16.1436 5.37081C16.0547 5.32264 15.9651 5.27602 15.8747 5.23095Z"
fill="#FFFFFF"
/>
<path
xmlns="http://www.w3.org/2000/svg"
d="M10.9102 0L13.0902 0L13.0902 8.72736L10.9102 8.72736L10.9102 0Z"
fill="#FFFFFF"
/>
</g>
<defs>
<filter
id="filter_2442_480"
x="-10"
y="-10"
width="52.000244"
height="53.800659"
filterUnits="userSpaceOnUse"
color-interpolation-filters="sRGB"
>
<feFlood flood-opacity="0" result="feFloodId_2442_480" />
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
result="hardAlpha_2442_480" />
<feColorMatrix
in="SourceAlpha"
type="matrix"
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
result="hardAlpha_2442_480"
/>
<feOffset dx="0" dy="0" />
<feGaussianBlur stdDeviation="4.5" />
<feComposite in2="hardAlpha_2442_480" operator="out" />
<feColorMatrix type="matrix"
values="0 0 0 0 0.0784313725490196 0 0 0 0 0.4627450980392157 0 0 0 0 1 0 0 0 1 0" />
<feColorMatrix
type="matrix"
values="0 0 0 0 0.0784313725490196 0 0 0 0 0.4627450980392157 0 0 0 0 1 0 0 0 1 0"
/>
<feBlend mode="normal" in2="feFloodId_2442_480" result="dropShadow_1_2442_480" />
<feBlend mode="normal" in="SourceGraphic" in2="dropShadow_1_2442_480" result="shape_2442_480" />
<feBlend
mode="normal"
in="SourceGraphic"
in2="dropShadow_1_2442_480"
result="shape_2442_480"
/>
</filter>
</defs>
</svg>
@ -341,7 +417,14 @@
</div>
</template>
<template #footer>
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
<!-- <uploadFiles accept=".YJ" :maxSize="1"></uploadFiles> -->
<el-button
@click="importAuth"
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
>
<span>{{ t('auths.upload') }}</span>
</el-button>
<button @click="close">退出系统</button>
</template>
</Dialog>
@ -360,7 +443,7 @@ import { ipcMain } from 'electron'
import { AuthApi } from '@/api/setting/auth'
import Dialog from '@/components/dialog/baseDialog.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { $sendElectronChanel } from '@/utils/communication'
import { $sendElectronChanel, $recvElectronChanel } from '@/utils/communication'
const {
loginFormRef,
@ -569,6 +652,25 @@ const getAuthCode = async () => {
const res = await AuthApi.authInfo()
authInfo.value.license_code = res.data
}
function importAuth() {
// importWin = true
let option = {
properties: ['openFile'],
filters: [{ name: '授权文件', extensions: ['YJ'] }]
}
$sendElectronChanel('open-directory-dialog', option)
$recvElectronChanel('selectedItem', (e, paths) => {
let formdata = new FormData()
formdata.append('filePath', paths[0])
try {
let res = AuthApi.authImport(formdata)
ElMessage.success('文件授权成功')
isAuth.value = false
baseDialog.value?.close()
} catch (error) {}
})
}
// setTimeout(() => {
// getAuthCode()
// }, 8000)