Merge branch 'zyl' of http://xny.yj-3d.com:3000/zhouyulong/electron-4 into zyl
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8
src/renderer/public/sdk/YJEarth.min.js
vendored
8
src/renderer/public/sdk/YJEarth.min.js
vendored
File diff suppressed because one or more lines are too long
@ -49,13 +49,8 @@
|
|||||||
--color-text-shadow: rgba(20, 118, 255, 1);
|
--color-text-shadow: rgba(20, 118, 255, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .cesium-viewer.\32 d{
|
|
||||||
opacity: 0;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.cesium-viewer-cesiumWidgetContainer {
|
.cesium-viewer-cesiumWidgetContainer {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cesium-viewer-cesiumWidgetContainer .cesium-widget:nth-of-type(1) {
|
.cesium-viewer-cesiumWidgetContainer .cesium-widget:nth-of-type(1) {
|
||||||
@ -176,14 +171,9 @@
|
|||||||
|
|
||||||
.YJ-custom-base-dialog button:not(button[disabled]):hover {
|
.YJ-custom-base-dialog button:not(button[disabled]):hover {
|
||||||
border-color: rgba(var(--color-base1), 1) !important;
|
border-color: rgba(var(--color-base1), 1) !important;
|
||||||
color: rgba(var(--color-base1), 1) !important;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog button:not(button[disabled]):hover svg {
|
|
||||||
fill: rgba(var(--color-base1), 1) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.YJ-custom-base-dialog button:focus-visible {
|
.YJ-custom-base-dialog button:focus-visible {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
@ -289,10 +279,6 @@
|
|||||||
padding: 0px 24px;
|
padding: 0px 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog>.content .el-tabs .el-tabs__header {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.YJ-custom-base-dialog>.content .div-item {
|
.YJ-custom-base-dialog>.content .div-item {
|
||||||
/* border-top: 1px solid rgba(204, 204, 204, 0.2); */
|
/* border-top: 1px solid rgba(204, 204, 204, 0.2); */
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
@ -343,7 +329,7 @@
|
|||||||
|
|
||||||
.YJ-custom-base-dialog>.content input,
|
.YJ-custom-base-dialog>.content input,
|
||||||
.YJ-custom-base-dialog>.content textarea {
|
.YJ-custom-base-dialog>.content textarea {
|
||||||
font-size: 14px;
|
font-size: 16px;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
border: 1px solid rgba(var(--color-base1), 0.5);
|
border: 1px solid rgba(var(--color-base1), 0.5);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@ -487,9 +473,6 @@
|
|||||||
.YJ-custom-base-dialog>.content .table .table-body .tr:first-child {
|
.YJ-custom-base-dialog>.content .table .table-body .tr:first-child {
|
||||||
border-top: none;
|
border-top: none;
|
||||||
}
|
}
|
||||||
.YJ-custom-base-dialog>.content .table .table-body .tr:last-child {
|
|
||||||
border-bottom: 1px solid rgba(var(--color-base1), 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.YJ-custom-base-dialog>.content .table .table-empty {
|
.YJ-custom-base-dialog>.content .table .table-empty {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1789,7 +1772,7 @@
|
|||||||
|
|
||||||
/* 轨迹运动 */
|
/* 轨迹运动 */
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content {
|
.YJ-custom-base-dialog.trajectory-motion>.content {
|
||||||
width: 562px;
|
width: 550px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content .div-item>.row>.col {
|
.YJ-custom-base-dialog.trajectory-motion>.content .div-item>.row>.col {
|
||||||
@ -1818,10 +1801,6 @@
|
|||||||
|
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active {
|
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active {
|
||||||
border-color: rgba(var(--color-base1));
|
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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content .btn-group .btn.is-active>span {
|
.YJ-custom-base-dialog.trajectory-motion>.content .btn-group .btn.is-active>span {
|
||||||
@ -1847,6 +1826,7 @@
|
|||||||
.YJ-custom-base-dialog.trajectory-motion>.content .icon-rubric {
|
.YJ-custom-base-dialog.trajectory-motion>.content .icon-rubric {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
margin-left: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content .custom__popper__arrow::after {
|
.YJ-custom-base-dialog.trajectory-motion>.content .custom__popper__arrow::after {
|
||||||
@ -2536,8 +2516,8 @@
|
|||||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
.YJ-custom-base-dialog.polygon>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
||||||
flex: 0 0 175px;
|
flex: 0 0 165px;
|
||||||
width: 175px;
|
width: 165px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2620,8 +2600,8 @@
|
|||||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
.YJ-custom-base-dialog.assemble>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
||||||
flex: 0 0 175px;
|
flex: 0 0 165px;
|
||||||
width: 175px;
|
width: 165px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2680,8 +2660,8 @@
|
|||||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
||||||
flex: 0 0 175px;
|
flex: 0 0 165px;
|
||||||
width: 175px;
|
width: 165px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2763,7 +2743,7 @@
|
|||||||
|
|
||||||
/* 折线 */
|
/* 折线 */
|
||||||
.YJ-custom-base-dialog.polyline>.content {
|
.YJ-custom-base-dialog.polyline>.content {
|
||||||
width: 600px;
|
width: 580px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog.polyline>.content>div #dashTextureDom {
|
.YJ-custom-base-dialog.polyline>.content>div #dashTextureDom {
|
||||||
@ -3798,7 +3778,7 @@
|
|||||||
.yj-custom-icon {
|
.yj-custom-icon {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 22px;
|
width: 22px;
|
||||||
height: 18px;
|
height: 10px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:on-error="handleError"
|
:on-error="handleError"
|
||||||
class="simple-upload"
|
class="simple-upload"
|
||||||
|
accept=".YJ"
|
||||||
>
|
>
|
||||||
<el-button class="clickBut" color="#005c5c" :loading="isUploading">
|
<el-button class="clickBut" color="#005c5c" :loading="isUploading">
|
||||||
<UploadFilled class="mr-2" />
|
<UploadFilled class="mr-2" />
|
||||||
@ -53,7 +54,7 @@ const isUploading = ref(false)
|
|||||||
const uploadUrl = () => {
|
const uploadUrl = () => {
|
||||||
//process.env.BASE_API +
|
//process.env.BASE_API +
|
||||||
console.log(process.env.BASE_API, 'yyyyy')
|
console.log(process.env.BASE_API, 'yyyyy')
|
||||||
let url = (localStorage.getItem("ip") || 'http://127.0.0.1:8848') + '/auth/import'
|
let url = (localStorage.getItem('ip') || 'http://127.0.0.1:8848') + '/auth/import'
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
// 上传前处理
|
// 上传前处理
|
||||||
|
|||||||
@ -204,22 +204,22 @@ const getAuthInfo = async () => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 统一处理错误
|
// 统一处理错误
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '退出系统',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '去授权',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
closeOnClickModal: false
|
closeOnClickModal: false
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
ipcRenderer.send('quit-app')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
try {
|
try {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('打开授权对话框失败:', error)
|
console.error('打开授权对话框失败:', error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
|
||||||
// 用户点击取消,不执行任何操作
|
|
||||||
ipcRenderer.send('quit-app')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const selectedService = ref('接口服务')
|
const selectedService = ref('接口服务')
|
||||||
@ -233,22 +233,22 @@ const getStatus = (date) => {
|
|||||||
router.push({ path: '/login' })
|
router.push({ path: '/login' })
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '退出系统',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '去授权',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
closeOnClickModal: false
|
closeOnClickModal: false
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
ipcRenderer.send('quit-app')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
try {
|
try {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('打开授权对话框失败:', error)
|
console.error('打开授权对话框失败:', error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
|
||||||
// 用户点击取消,不执行任何操作
|
|
||||||
ipcRenderer.send('quit-app')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@ -205,7 +205,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const routeImport = () => {
|
const routeImport = () => {
|
||||||
let option = {
|
let option = {
|
||||||
properties: ['openFile'],
|
properties: ['openFile', 'multiSelections'],
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
name: '路网', //、底图
|
name: '路网', //、底图
|
||||||
@ -215,10 +215,11 @@ const routeImport = () => {
|
|||||||
}
|
}
|
||||||
$sendElectronChanel('open-directory-dialog', option)
|
$sendElectronChanel('open-directory-dialog', option)
|
||||||
$recvElectronChanel('selectedItem', (e, path) => {
|
$recvElectronChanel('selectedItem', (e, path) => {
|
||||||
|
console.log(path, 'path')
|
||||||
if (path.length) {
|
if (path.length) {
|
||||||
RouteApi.loadRoute({
|
const formData = new FormData()
|
||||||
path: path[0]
|
formData.append('paths', path)
|
||||||
}).then((res) => {
|
RouteApi.loadRoute(formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
RouteApi.getRouteList().then((list) => {
|
RouteApi.getRouteList().then((list) => {
|
||||||
routeList.splice(0, routeList.length, ...list.data)
|
routeList.splice(0, routeList.length, ...list.data)
|
||||||
@ -253,7 +254,7 @@ const routeImport = () => {
|
|||||||
}
|
}
|
||||||
const poiImport = () => {
|
const poiImport = () => {
|
||||||
let option = {
|
let option = {
|
||||||
properties: ['openFile'],
|
properties: ['openFile', 'multiSelections'],
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
name: 'poi', //、底图
|
name: 'poi', //、底图
|
||||||
@ -264,9 +265,9 @@ const poiImport = () => {
|
|||||||
$sendElectronChanel('open-directory-dialog', option)
|
$sendElectronChanel('open-directory-dialog', option)
|
||||||
$recvElectronChanel('selectedItem', (e, path) => {
|
$recvElectronChanel('selectedItem', (e, path) => {
|
||||||
if (path.length) {
|
if (path.length) {
|
||||||
PoiApi.loadPoi({
|
const formData = new FormData()
|
||||||
path: path[0]
|
formData.append('paths', path)
|
||||||
}).then((res) => {
|
PoiApi.loadPoi(formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
PoiApi.getPoiList().then((list) => {
|
PoiApi.getPoiList().then((list) => {
|
||||||
poiList.splice(0, poiList.length, ...list.data)
|
poiList.splice(0, poiList.length, ...list.data)
|
||||||
@ -458,12 +459,12 @@ const handleError = (error: Error) => {
|
|||||||
}
|
}
|
||||||
//工程合并导入
|
//工程合并导入
|
||||||
const mergeProject = () => {
|
const mergeProject = () => {
|
||||||
ElMessageBox.confirm(`项目已存在,继续导入将合并项目,是否执行?`, '提示', {
|
// ElMessageBox.confirm(`项目已存在,继续导入将合并项目,是否执行?`, '提示', {
|
||||||
confirmButtonText: '确定',
|
// confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
// cancelButtonText: '取消',
|
||||||
type: 'warning'
|
// type: 'warning'
|
||||||
})
|
// })
|
||||||
.then(() => {
|
// .then(() => {
|
||||||
let option = {
|
let option = {
|
||||||
properties: ['openFile'],
|
properties: ['openFile'],
|
||||||
filters: [
|
filters: [
|
||||||
@ -493,8 +494,8 @@ const mergeProject = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
// })
|
||||||
.catch(() => {})
|
// .catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
//工程导入(单机)
|
//工程导入(单机)
|
||||||
@ -666,6 +667,7 @@ function derive() {
|
|||||||
arr[arr.length - 1] = 'yjearth/app.db'
|
arr[arr.length - 1] = 'yjearth/app.db'
|
||||||
let db_path: any = arr.join('/')
|
let db_path: any = arr.join('/')
|
||||||
// let db_path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth/app.db'
|
// let db_path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth/app.db'
|
||||||
|
try {
|
||||||
zip_file([db_path], path, () => {
|
zip_file([db_path], path, () => {
|
||||||
// loadingInstance.close()
|
// loadingInstance.close()
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@ -673,6 +675,12 @@ function derive() {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage({
|
||||||
|
message: error,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -32,12 +32,12 @@
|
|||||||
<span>批量导入</span>
|
<span>批量导入</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="input3"
|
v-model.trim="input3"
|
||||||
style="max-width: 250px"
|
style="max-width: 250px"
|
||||||
placeholder="请输入设备名称进行搜索"
|
placeholder="请输入设备名称进行搜索"
|
||||||
class="input-with-select"
|
class="input-with-select"
|
||||||
:suffix-icon="Search"
|
:suffix-icon="Search"
|
||||||
@input="getTableList()"
|
@change="getTableList()"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
@ -153,6 +153,7 @@ const getTableList = async () => {
|
|||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
tableData.value = res.data.records
|
tableData.value = res.data.records
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
|
console.log(tableData.value.length, 'leleleleele')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,8 +293,11 @@ const downloadTemp = async () => {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
::v-deep .addDevice {
|
::v-deep .addDevice {
|
||||||
background:
|
background: linear-gradient(
|
||||||
linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%),
|
180deg,
|
||||||
|
rgba(var(--color-base1), 0.2) 0%,
|
||||||
|
rgba(var(--color-base1), 0) 100%
|
||||||
|
),
|
||||||
rgba(0, 0, 0, 1) !important;
|
rgba(0, 0, 0, 1) !important;
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
|||||||
@ -312,13 +312,33 @@ eventBus.on('settingPop', (data) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let openfunc = () => {
|
||||||
|
if (haventModel) {
|
||||||
|
ElMessage.warning('请先创建或导入军标库文件')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取模型列表
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
eventBus.on('openGraphLabel', openfunc)
|
||||||
|
})
|
||||||
|
onUnmounted(() => {
|
||||||
|
eventBus.off('openGraphLabel', openfunc)
|
||||||
|
})
|
||||||
|
let haventModel = false
|
||||||
const getModelList = async () => {
|
const getModelList = async () => {
|
||||||
const params = new URLSearchParams()
|
const params = new URLSearchParams()
|
||||||
params.append('militaryName', photoName.value)
|
params.append('militaryName', photoName.value)
|
||||||
const res: any = await GraphApi.modelTypeList(params)
|
const res: any = await GraphApi.modelTypeList(params)
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
if (res.message != '请先创建或导入军标库') {
|
||||||
let data = transformNestedJson(res.data, 'name', 'label')
|
let data = transformNestedJson(res.data, 'name', 'label')
|
||||||
typeTreeData.value = data
|
typeTreeData.value = data
|
||||||
|
haventModel = false
|
||||||
|
} else {
|
||||||
|
//标识没得库文件
|
||||||
|
haventModel = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const transformNestedJson = (data, oldKey, newKey) => {
|
const transformNestedJson = (data, oldKey, newKey) => {
|
||||||
|
|||||||
@ -12,12 +12,12 @@
|
|||||||
<span>添加物资</span>
|
<span>添加物资</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="input3"
|
v-model.trim="input3"
|
||||||
style="max-width: 250px"
|
style="max-width: 250px"
|
||||||
placeholder="请输入物资名称进行搜索"
|
placeholder="请输入物资名称进行搜索"
|
||||||
class="input-with-select"
|
class="input-with-select"
|
||||||
:suffix-icon="Search"
|
:suffix-icon="Search"
|
||||||
@input="getTableList()"
|
@change="getTableList()"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
@ -185,8 +185,11 @@ var delFun = (row) => {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
::v-deep .addDevice {
|
::v-deep .addDevice {
|
||||||
background:
|
background: linear-gradient(
|
||||||
linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%),
|
180deg,
|
||||||
|
rgba(var(--color-base1), 0.2) 0%,
|
||||||
|
rgba(var(--color-base1), 0) 100%
|
||||||
|
),
|
||||||
rgba(0, 0, 0, 1) !important;
|
rgba(0, 0, 0, 1) !important;
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
|||||||
@ -312,12 +312,21 @@ let setFunc = (data) => {
|
|||||||
showImageRow = null
|
showImageRow = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let openfunc = () => {
|
||||||
|
if (haventModel) {
|
||||||
|
ElMessage.warning('请先创建或导入模型库文件')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取模型列表
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
eventBus.off('settingPop', setFunc)
|
eventBus.off('settingPop', setFunc)
|
||||||
eventBus.on('settingPop', setFunc)
|
eventBus.on('settingPop', setFunc)
|
||||||
|
eventBus.on('openModelManage', openfunc)
|
||||||
})
|
})
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
eventBus.off('settingPop', setFunc)
|
eventBus.off('settingPop', setFunc)
|
||||||
|
eventBus.off('openModelManage', openfunc)
|
||||||
})
|
})
|
||||||
//获取模型列表
|
//获取模型列表
|
||||||
// eventBus.on('settingPop', (data) => {
|
// eventBus.on('settingPop', (data) => {
|
||||||
@ -344,11 +353,13 @@ const updateExpandedState = () => {
|
|||||||
const keys = getExpandedKeys()
|
const keys = getExpandedKeys()
|
||||||
expandedKeys.value = keys
|
expandedKeys.value = keys
|
||||||
}
|
}
|
||||||
|
let haventModel = false
|
||||||
const getModelList = async () => {
|
const getModelList = async () => {
|
||||||
const params = new URLSearchParams()
|
const params = new URLSearchParams()
|
||||||
params.append('modelName', photoName.value)
|
params.append('modelName', photoName.value)
|
||||||
const res: any = await ModelApi.modelTypeList(params)
|
const res: any = await ModelApi.modelTypeList(params)
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
if (res.message != '请先创建或导入模型库') {
|
||||||
let data = transformNestedJson(res.data, 'name', 'label')
|
let data = transformNestedJson(res.data, 'name', 'label')
|
||||||
typeTreeData.value = data
|
typeTreeData.value = data
|
||||||
const saved = localStorage.getItem('tree-expanded-keys')
|
const saved = localStorage.getItem('tree-expanded-keys')
|
||||||
@ -368,6 +379,11 @@ const getModelList = async () => {
|
|||||||
|
|
||||||
localStorage.removeItem('tree-click-node')
|
localStorage.removeItem('tree-click-node')
|
||||||
}
|
}
|
||||||
|
haventModel = false
|
||||||
|
} else {
|
||||||
|
//标识没得库文件
|
||||||
|
haventModel = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const transformNestedJson = (data, oldKey, newKey) => {
|
const transformNestedJson = (data, oldKey, newKey) => {
|
||||||
|
|||||||
@ -383,6 +383,20 @@ eventBus.on('settingPop', (data) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let openfunc = () => {
|
||||||
|
if (haventModel) {
|
||||||
|
ElMessage.warning('请先创建或导入图标库文件')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取模型列表
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
eventBus.on('openPhotoManage', openfunc)
|
||||||
|
})
|
||||||
|
onUnmounted(() => {
|
||||||
|
eventBus.off('openPhotoManage', openfunc)
|
||||||
|
})
|
||||||
|
let haventModel = false
|
||||||
const getModelList = async () => {
|
const getModelList = async () => {
|
||||||
if (activeIndex.value !== 2) {
|
if (activeIndex.value !== 2) {
|
||||||
typeTreeData.value = [
|
typeTreeData.value = [
|
||||||
@ -398,8 +412,14 @@ const getModelList = async () => {
|
|||||||
params.append('iconName', photoName.value)
|
params.append('iconName', photoName.value)
|
||||||
const res: any = await PhotoApi.modelTypeList(params)
|
const res: any = await PhotoApi.modelTypeList(params)
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
if (res.message != '请先创建或导入图标库') {
|
||||||
let data = transformNestedJson(res.data, 'name', 'label')
|
let data = transformNestedJson(res.data, 'name', 'label')
|
||||||
typeTreeData.value = data
|
typeTreeData.value = data
|
||||||
|
haventModel = false
|
||||||
|
} else {
|
||||||
|
//标识没得库文件
|
||||||
|
haventModel = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -484,8 +484,8 @@ import { sysChange as utilsSysChange } from '@/utils/sysChange'
|
|||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
const { t, locale } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
|
|
||||||
const isHotGroupOpen: any = ref(false)
|
const isHotGroupOpen: any = ref(true)
|
||||||
const isHotGroupOpen2: any = ref(false)
|
const isHotGroupOpen2: any = ref(true)
|
||||||
const showPosiType: any = ref(false)
|
const showPosiType: any = ref(false)
|
||||||
|
|
||||||
const systemSetting = ref({
|
const systemSetting = ref({
|
||||||
@ -583,7 +583,7 @@ const searchWay = ref()
|
|||||||
const concurrentcode = ref()
|
const concurrentcode = ref()
|
||||||
const showBattery = ref()
|
const showBattery = ref()
|
||||||
searchWay.value = localStorage.getItem('searchWay') || 'net'
|
searchWay.value = localStorage.getItem('searchWay') || 'net'
|
||||||
concurrentcode.value = localStorage.getItem('concurrentcode') || 10
|
concurrentcode.value = localStorage.getItem('concurrentcode') || 30
|
||||||
//系统坐标系
|
//系统坐标系
|
||||||
let tool = new YJ.Tools(window.earth)
|
let tool = new YJ.Tools(window.earth)
|
||||||
name_map.value = Array.from(tool.name_map.values())
|
name_map.value = Array.from(tool.name_map.values())
|
||||||
|
|||||||
@ -149,6 +149,19 @@ const open = (data) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changeTab = (x, j) => {
|
const changeTab = (x, j) => {
|
||||||
|
switch (x) {
|
||||||
|
case 'modelManage':
|
||||||
|
eventBus.emit('openModelManage')
|
||||||
|
break
|
||||||
|
case 'photoManage':
|
||||||
|
eventBus.emit('openPhotoManage')
|
||||||
|
break
|
||||||
|
case 'graphLabelManage':
|
||||||
|
eventBus.emit('openGraphLabel')
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
switch (j) {
|
switch (j) {
|
||||||
case 'device':
|
case 'device':
|
||||||
eventBus.emit('closeAddDevice')
|
eventBus.emit('closeAddDevice')
|
||||||
@ -168,8 +181,7 @@ onMounted(() => {
|
|||||||
// 可以在这里添加初始化逻辑
|
// 可以在这里添加初始化逻辑
|
||||||
if (locale.value === 'zh-EN') {
|
if (locale.value === 'zh-EN') {
|
||||||
isEN.value = true
|
isEN.value = true
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
isEN.value = false
|
isEN.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -177,8 +189,7 @@ onMounted(() => {
|
|||||||
watch(locale, () => {
|
watch(locale, () => {
|
||||||
if (locale.value === 'zh-EN') {
|
if (locale.value === 'zh-EN') {
|
||||||
isEN.value = true
|
isEN.value = true
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
isEN.value = false
|
isEN.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -17,7 +17,13 @@
|
|||||||
<el-select style="width: 175px" v-model="coordinate" @change="sysChange">
|
<el-select style="width: 175px" v-model="coordinate" @change="sysChange">
|
||||||
<div
|
<div
|
||||||
class="group-header"
|
class="group-header"
|
||||||
:class="isHotGroupOpen ? 'arrowActive' : ''"
|
:class="
|
||||||
|
name_map1.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'arrowActive'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
@click="toggleGroup('hot')"
|
@click="toggleGroup('hot')"
|
||||||
>
|
>
|
||||||
地理坐标系
|
地理坐标系
|
||||||
@ -25,14 +31,26 @@
|
|||||||
v-if="isHotGroupOpen"
|
v-if="isHotGroupOpen"
|
||||||
name="arrow2"
|
name="arrow2"
|
||||||
:size="10"
|
:size="10"
|
||||||
color="rgba(0, 255, 255, 1)"
|
:color="
|
||||||
|
name_map1.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'rgba(0, 255, 255, 1)'
|
||||||
|
: 'rgba(255, 255, 255, 1)'
|
||||||
|
"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
></svg-icon>
|
></svg-icon>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-else
|
v-else
|
||||||
name="arrow1"
|
name="arrow1"
|
||||||
:size="10"
|
:size="10"
|
||||||
color="rgba(255, 255, 255, 1)"
|
:color="
|
||||||
|
name_map1.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'rgba(0, 255, 255, 1)'
|
||||||
|
: 'rgba(255, 255, 255, 1)'
|
||||||
|
"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
></svg-icon>
|
></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
@ -46,7 +64,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="group-header"
|
class="group-header"
|
||||||
:class="isHotGroupOpen2 ? 'arrowActive' : ''"
|
:class="
|
||||||
|
name_map2.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'arrowActive'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
@click="toggleGroup('ty')"
|
@click="toggleGroup('ty')"
|
||||||
>
|
>
|
||||||
投影坐标系
|
投影坐标系
|
||||||
@ -54,14 +78,26 @@
|
|||||||
v-if="isHotGroupOpen2"
|
v-if="isHotGroupOpen2"
|
||||||
name="arrow2"
|
name="arrow2"
|
||||||
:size="10"
|
:size="10"
|
||||||
color="rgba(0, 255, 255, 1)"
|
:color="
|
||||||
|
name_map2.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'rgba(0, 255, 255, 1)'
|
||||||
|
: 'rgba(255, 255, 255, 1)'
|
||||||
|
"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
></svg-icon>
|
></svg-icon>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-else
|
v-else
|
||||||
name="arrow1"
|
name="arrow1"
|
||||||
:size="10"
|
:size="10"
|
||||||
color="rgba(255, 255, 255, 1)"
|
:color="
|
||||||
|
name_map2.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'rgba(0, 255, 255, 1)'
|
||||||
|
: 'rgba(255, 255, 255, 1)'
|
||||||
|
"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
></svg-icon>
|
></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
@ -122,9 +158,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="flex: 0 0 78%">
|
<div class="col" style="flex: 0 0 78%">
|
||||||
<span class="label">经度</span>
|
<span class="label">经度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="longitude" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="longitude" />
|
||||||
<span class="label2">度</span>
|
<span class="label2">度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="lngMin" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="lngMin" />
|
||||||
<span class="label2">分</span>
|
<span class="label2">分</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
@ -132,9 +168,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="flex: 0 0 78%">
|
<div class="col" style="flex: 0 0 78%">
|
||||||
<span class="label">纬度</span>
|
<span class="label">纬度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latitude" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latitude" />
|
||||||
<span class="label2">度</span>
|
<span class="label2">度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latMin" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latMin" />
|
||||||
<span class="label2">分</span>
|
<span class="label2">分</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
@ -155,11 +191,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="flex: 0 0 90%">
|
<div class="col" style="flex: 0 0 90%">
|
||||||
<span class="label">经度</span>
|
<span class="label">经度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="longitude" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="longitude" />
|
||||||
<span class="label2">度</span>
|
<span class="label2">度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="lngMin" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="lngMin" />
|
||||||
<span class="label2">分</span>
|
<span class="label2">分</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="lngSec" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="lngSec" />
|
||||||
<span class="label2">秒</span>
|
<span class="label2">秒</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
@ -167,11 +203,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="flex: 0 0 90%">
|
<div class="col" style="flex: 0 0 90%">
|
||||||
<span class="label">纬度</span>
|
<span class="label">纬度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latitude" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latitude" />
|
||||||
<span class="label2">度</span>
|
<span class="label2">度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latMin" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latMin" />
|
||||||
<span class="label2">分</span>
|
<span class="label2">分</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latSec" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latSec" />
|
||||||
<span class="label2">秒</span>
|
<span class="label2">秒</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
@ -365,6 +401,7 @@ const turnToPosition = async () => {
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'second':
|
case 'second':
|
||||||
|
console.log(longitude.value, lngMin.value, 'klklkl')
|
||||||
// @ts-ignore (define in dts)
|
// @ts-ignore (define in dts)
|
||||||
var lng = Math.abs(longitude.value) + Math.abs(lngMin.value) / 60
|
var lng = Math.abs(longitude.value) + Math.abs(lngMin.value) / 60
|
||||||
// @ts-ignore (define in dts)
|
// @ts-ignore (define in dts)
|
||||||
@ -379,8 +416,8 @@ const turnToPosition = async () => {
|
|||||||
window.earth
|
window.earth
|
||||||
)
|
)
|
||||||
position = {
|
position = {
|
||||||
lng: lng,
|
lng: longitude.value != null && lngMin.value != null ? lng : null,
|
||||||
lat: lat,
|
lat: latitude.value != null && latMin.value != null ? lat : null,
|
||||||
alt: point2[0].height < 0 ? 0 : point2[0].height
|
alt: point2[0].height < 0 ? 0 : point2[0].height
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,8 +440,8 @@ const turnToPosition = async () => {
|
|||||||
window.earth
|
window.earth
|
||||||
)
|
)
|
||||||
position = {
|
position = {
|
||||||
lng: lng,
|
lng: longitude.value != null && lngMin.value != null && lngSec.value != null ? lng : null,
|
||||||
lat: lat,
|
lat: latitude.value != null && latMin.value != null && latSec.value != null ? lat : null,
|
||||||
alt: point3[0].height < 0 ? 0 : point3[0].height
|
alt: point3[0].height < 0 ? 0 : point3[0].height
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@ -444,6 +481,7 @@ const getPosition = async () => {
|
|||||||
}
|
}
|
||||||
const flyto = async (e) => {
|
const flyto = async (e) => {
|
||||||
await getPosition()
|
await getPosition()
|
||||||
|
console.log(pointPosi.lng, pointPosi.lng !== 0, pointPosi.lat, 'ooppp')
|
||||||
if ((!pointPosi.lng && pointPosi.lng !== 0) || (!pointPosi.lat && pointPosi.lng !== 0)) {
|
if ((!pointPosi.lng && pointPosi.lng !== 0) || (!pointPosi.lat && pointPosi.lng !== 0)) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '请正确填写坐标信息!',
|
message: '请正确填写坐标信息!',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog ref="baseDialog" title="物质统计" left="180px" top="100px" :closeCallback="closeCallBack">
|
<Dialog ref="baseDialog" title="物资统计" left="180px" top="100px" :closeCallback="closeCallBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div id="goodSearchEchart" style="width: 650px; height: 400px"></div>
|
<div id="goodSearchEchart" style="width: 650px; height: 400px"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog ref="baseDialog" title="物质统计" left="180px" top="100px" :closeCallback="closeCallBack">
|
<Dialog ref="baseDialog" title="物资统计" left="180px" top="100px" :closeCallback="closeCallBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div id="goodSearchEchart2" style="width: 650px; height: 400px"></div>
|
<div id="goodSearchEchart2" style="width: 650px; height: 400px"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -207,6 +207,7 @@
|
|||||||
import { ref, reactive, onBeforeUnmount } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
import { set } from 'date-fns'
|
||||||
|
|
||||||
const baseDialog: any = ref(null)
|
const baseDialog: any = ref(null)
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
@ -228,7 +229,7 @@ var readOnly = ref(true)
|
|||||||
eventBus.on('submergeDialog', () => {
|
eventBus.on('submergeDialog', () => {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
|
|
||||||
submerge = new YJ.Analysis.Submerge(window.earth)
|
submerge = new YJ.Analysis.Submerge(window.earth, {}, {}, animationEnd)
|
||||||
submerge.onEnd = (areaV, posi) => {
|
submerge.onEnd = (areaV, posi) => {
|
||||||
isPausng.value = false
|
isPausng.value = false
|
||||||
minWaterLevel.value = submerge.minWaterLevel
|
minWaterLevel.value = submerge.minWaterLevel
|
||||||
@ -244,7 +245,7 @@ eventBus.on('submergeDialog', () => {
|
|||||||
const open = () => {
|
const open = () => {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
|
|
||||||
submerge = new YJ.Analysis.Submerge(window.earth)
|
submerge = new YJ.Analysis.Submerge(window.earth, {}, {}, animationEnd)
|
||||||
submerge.onEnd = (areaV, posi) => {
|
submerge.onEnd = (areaV, posi) => {
|
||||||
isPausng.value = false
|
isPausng.value = false
|
||||||
minWaterLevel.value = submerge.minWaterLevel
|
minWaterLevel.value = submerge.minWaterLevel
|
||||||
@ -257,6 +258,12 @@ const open = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let restart = false
|
||||||
|
const animationEnd = () => {
|
||||||
|
isPausng.value = false
|
||||||
|
restart = true
|
||||||
|
}
|
||||||
|
|
||||||
const closeCallBack = (e) => {
|
const closeCallBack = (e) => {
|
||||||
minWaterLevel.value = 0
|
minWaterLevel.value = 0
|
||||||
maxWaterLevel.value = 0
|
maxWaterLevel.value = 0
|
||||||
@ -287,19 +294,31 @@ function flyTo() {
|
|||||||
function reset() {
|
function reset() {
|
||||||
isPausng.value = false
|
isPausng.value = false
|
||||||
submerge.restart()
|
submerge.restart()
|
||||||
|
restart = false
|
||||||
}
|
}
|
||||||
function pause() {
|
function pause() {
|
||||||
|
if (risingSpeed.value != 0) {
|
||||||
if (!isPausng.value) {
|
if (!isPausng.value) {
|
||||||
//暂停中
|
//暂停中
|
||||||
console.log('暂停中')
|
if (!restart) {
|
||||||
submerge.move()
|
submerge.move()
|
||||||
submerge.start()
|
submerge.start()
|
||||||
|
} else {
|
||||||
|
submerge.restart()
|
||||||
|
setTimeout(() => {
|
||||||
|
submerge.move()
|
||||||
|
submerge.start()
|
||||||
|
}, 10)
|
||||||
|
|
||||||
|
restart = false
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
//播放中
|
//播放中
|
||||||
submerge.pause()
|
submerge.pause()
|
||||||
}
|
}
|
||||||
isPausng.value = !isPausng.value
|
isPausng.value = !isPausng.value
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function analog() {
|
function analog() {
|
||||||
isPausng.value = false
|
isPausng.value = false
|
||||||
submerge.move()
|
submerge.move()
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<el-input v-model.trim="addForm.password" clearable placeholder="请输入密码"></el-input>
|
<el-input v-model.trim="addForm.password" clearable placeholder="请输入密码"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备类型" prop="type">
|
<el-form-item label="设备类型" prop="type">
|
||||||
<el-select v-model.trim="addForm.type" filterable placeholder="请选择设备类型">
|
<el-select v-model.trim="addForm.type" placeholder="请选择设备类型">
|
||||||
<el-option label="海康" value="海康"></el-option>
|
<el-option label="海康" value="海康"></el-option>
|
||||||
<el-option label="大华" value="大华"></el-option>
|
<el-option label="大华" value="大华"></el-option>
|
||||||
<!-- <el-option label="手动录入" value="3"> </el-option> -->
|
<!-- <el-option label="手动录入" value="3"> </el-option> -->
|
||||||
@ -221,10 +221,12 @@ defineExpose({
|
|||||||
::v-deep .el-form-item--label-right .el-form-item__label {
|
::v-deep .el-form-item--label-right .el-form-item__label {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-form-item .el-input__wrapper {
|
::v-deep .el-form-item .el-input__wrapper {
|
||||||
background-color: rgba(0, 0, 0, 0.5) !important;
|
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||||
box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */
|
box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-form-item .el-select__wrapper {
|
::v-deep .el-form-item .el-select__wrapper {
|
||||||
background-color: rgba(0, 0, 0, 0.5) !important;
|
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||||
box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */
|
box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */
|
||||||
@ -233,15 +235,19 @@ defineExpose({
|
|||||||
border: unset !important;
|
border: unset !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-form-item .el-input__inner {
|
::v-deep .el-form-item .el-input__inner {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-form-item .el-select__placeholder {
|
::v-deep .el-form-item .el-select__placeholder {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__wrapper {
|
::v-deep .el-input__wrapper {
|
||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-button:hover {
|
::v-deep .el-button:hover {
|
||||||
background-color: rgba(var(--color-base1), 0.2) !important;
|
background-color: rgba(var(--color-base1), 0.2) !important;
|
||||||
color: rgba(var(--color-base1), 1) !important;
|
color: rgba(var(--color-base1), 1) !important;
|
||||||
|
|||||||
@ -415,6 +415,7 @@ const router = useRouter()
|
|||||||
const getAuthInfo = async () => {
|
const getAuthInfo = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await AuthApi.showAuth()
|
const res = await AuthApi.showAuth()
|
||||||
|
console.log(res, 'resresres')
|
||||||
if (typeof res.data === 'object') {
|
if (typeof res.data === 'object') {
|
||||||
authInfo.value.generateTime = res.data.generateTime
|
authInfo.value.generateTime = res.data.generateTime
|
||||||
authInfo.value.expireTime = res.data.expireTime
|
authInfo.value.expireTime = res.data.expireTime
|
||||||
@ -423,23 +424,24 @@ const getAuthInfo = async () => {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 统一处理错误
|
// 统一处理错误
|
||||||
|
console.log('认证请求失败:', error)
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '退出系统',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '去授权',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
closeOnClickModal: false
|
closeOnClickModal: false
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
ipcRenderer.send('quit-app')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
try {
|
try {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('打开授权对话框失败:', error)
|
console.error('打开授权对话框失败:', error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
|
||||||
// 用户点击取消,不执行任何操作
|
|
||||||
ipcRenderer.send('quit-app')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const baseDialog = ref(null)
|
const baseDialog = ref(null)
|
||||||
@ -451,23 +453,24 @@ const getStatus = (date) => {
|
|||||||
// router.push({ path: '/login' })
|
// router.push({ path: '/login' })
|
||||||
isAuth.value = false
|
isAuth.value = false
|
||||||
} else {
|
} else {
|
||||||
|
console.log('授权时间已过')
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '退出系统',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '去授权',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
closeOnClickModal: false
|
closeOnClickModal: false
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
ipcRenderer.send('quit-app')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
try {
|
try {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('打开授权对话框失败:', error)
|
console.error('打开授权对话框失败:', error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
|
||||||
// 用户点击取消,不执行任何操作
|
|
||||||
ipcRenderer.send('quit-app')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -601,7 +604,7 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
.content {
|
.content {
|
||||||
.el-input__wrapper {
|
.el-input__wrapper {
|
||||||
// background-color: transparent;
|
// background-color: transparent;
|
||||||
border: 0.2px solid rgba(var(--color-base1), 1);
|
// border: 0.2px solid rgba(var(--color-base1), 1);
|
||||||
box-shadow: 0 0 0 0.2px rgba(var(--color-base1), 1) inset !important;
|
box-shadow: 0 0 0 0.2px rgba(var(--color-base1), 1) inset !important;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
padding: 3px 11px;
|
padding: 3px 11px;
|
||||||
|
|||||||
Reference in New Issue
Block a user