修改打包报错
This commit is contained in:
60
electron.vite.config.1763690275653.mjs
Normal file
60
electron.vite.config.1763690275653.mjs
Normal file
@ -0,0 +1,60 @@
|
||||
// electron.vite.config.ts
|
||||
import { resolve } from "path";
|
||||
import { defineConfig, externalizeDepsPlugin } from "electron-vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import AutoImport from "unplugin-auto-import/vite";
|
||||
import Components from "unplugin-vue-components/vite";
|
||||
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
||||
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
|
||||
import path from "path";
|
||||
var electron_vite_config_default = defineConfig({
|
||||
main: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
preload: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
renderer: {
|
||||
resolve: {
|
||||
alias: {
|
||||
"@renderer": resolve("src/renderer/src"),
|
||||
"@": resolve("src/renderer/src")
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
AutoImport({
|
||||
imports: ["vue"],
|
||||
dts: "src/auto-imports.d.ts",
|
||||
// 自动生成类型声明文件
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
// SVG图标插件配置
|
||||
// 配置SVG图标插件
|
||||
createSvgIconsPlugin({
|
||||
iconDirs: [path.resolve(process.cwd(), "src/renderer/src/icons/svg")],
|
||||
symbolId: "icon-[name]",
|
||||
// 自动清除 SVG 中的 fill 和 stroke 属性
|
||||
svgoOptions: {
|
||||
plugins: [{ name: "removeAttrs", params: { attrs: ["fill", "stroke", "stroke-width"] } }]
|
||||
}
|
||||
})
|
||||
]
|
||||
/*server: {
|
||||
port: 8848,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: localStorage.getItem('ip') || 'http://127.0.0.1:8848',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
});
|
||||
export {
|
||||
electron_vite_config_default as default
|
||||
};
|
||||
@ -39,6 +39,12 @@ export const TsApi = {
|
||||
data
|
||||
})
|
||||
},
|
||||
updateTsSource: async (data: any) => {
|
||||
return await request.post({
|
||||
url: '/tsSource/update',
|
||||
data
|
||||
})
|
||||
},
|
||||
///tsSource/addModelSource
|
||||
addTsModelSource: async (data: any) => {
|
||||
return await request.post({
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="MouseRight">
|
||||
<div v-for="item in menus" class="item" @click="item.fun">
|
||||
<svg-icon :name="item.icon||item.key" :size="14"></svg-icon>
|
||||
<svg-icon :name="item.key" :size="14"></svg-icon>
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
@ -15,7 +15,7 @@ import {useRightOperate} from './rightOperate'
|
||||
|
||||
let {delNode, addEvent} = useRightOperate()
|
||||
|
||||
const eventBus = inject("bus");
|
||||
const eventBus: any = inject("bus");
|
||||
let setOrReset = ref(1)
|
||||
let setView = (flag) => {
|
||||
// let cusView = window['YJ'].Global.getCurrentView(window['earth_ts'])
|
||||
@ -74,7 +74,7 @@ let menus = ref([
|
||||
])
|
||||
|
||||
eventBus.on("initMenus", () => {
|
||||
let customView = null
|
||||
let customView
|
||||
let entity = window['_entityMap'].get(window['selectedIdTs'])
|
||||
customView = Boolean(entity.customView && entity.customView.orientation)
|
||||
setOrReset.value = customView ? 0 : 1
|
||||
|
||||
@ -127,7 +127,10 @@
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
<button class="add-point" style="margin-left: 10px">
|
||||
<svg class="icon-add"><use xlink:href="#yj-icon-add"></use></svg>增加视点
|
||||
<svg class="icon-add">
|
||||
<use xlink:href="#yj-icon-add"></use>
|
||||
</svg>
|
||||
增加视点
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -192,13 +195,18 @@
|
||||
<template #footer>
|
||||
<div style="position: absolute; left: 24px; display: flex">
|
||||
<button class="afreshPlay">
|
||||
<svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>播放
|
||||
<svg class="icon-play">
|
||||
<use xlink:href="#yj-icon-play"></use>
|
||||
</svg>
|
||||
播放
|
||||
</button>
|
||||
<button class="cease" style="margin-left: 10px">
|
||||
<svg-icon name="stop" :size="12" color="rgba(255, 255, 255, 1)"></svg-icon>结束
|
||||
<svg-icon name="stop" :size="12" color="rgba(255, 255, 255, 1)"></svg-icon>
|
||||
结束
|
||||
</button>
|
||||
<button class="video" style="margin-left: 10px" @click="startVideo">
|
||||
<svg-icon name="video" :size="12"></svg-icon>录制
|
||||
<svg-icon name="video" :size="12"></svg-icon>
|
||||
录制
|
||||
</button>
|
||||
</div>
|
||||
<button class="saveRoam" @click="draw">保存</button>
|
||||
@ -208,6 +216,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
//@ts-nocheck
|
||||
import {ref, reactive, onBeforeUnmount} from 'vue'
|
||||
import {inject} from 'vue'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
@ -293,7 +302,8 @@ const startVideo = () => {
|
||||
window.addEventListener('keydown', handleKeyDown)
|
||||
}
|
||||
|
||||
const clangeViewPointHeight = () => {}
|
||||
const clangeViewPointHeight = () => {
|
||||
}
|
||||
const viewPointHeightInput = () => {
|
||||
let dom: any = document.getElementById('viewPointHeight')
|
||||
if (viewPointHeight.value < dom.min * 1) {
|
||||
@ -324,28 +334,29 @@ defineExpose({
|
||||
|
||||
<style scoped lang="scss">
|
||||
.afreshPlay {
|
||||
background:
|
||||
linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||
background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||
linear-gradient(180deg, rgba(27, 248, 195, 0.2) 0%, rgba(27, 248, 195, 0) 100%) !important;
|
||||
border: 1px solid rgba(27, 248, 195, 1) !important;
|
||||
color: rgba(27, 248, 195, 1) !important;
|
||||
|
||||
svg {
|
||||
fill: rgba(27, 248, 195, 1) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.cease {
|
||||
background:
|
||||
linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%),
|
||||
background: linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%),
|
||||
rgba(0, 0, 0, 0.5) !important;
|
||||
border: 1px solid rgba(241, 108, 85, 1) !important;
|
||||
color: rgba(241, 108, 85, 1) !important;
|
||||
|
||||
svg {
|
||||
fill: rgba(241, 108, 85, 1) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.video {
|
||||
background:
|
||||
linear-gradient(
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(71, 27, 5, 0.3) 0%,
|
||||
rgba(71, 27, 5, 0.3) 0%,
|
||||
@ -355,10 +366,12 @@ defineExpose({
|
||||
border: 1px solid rgba(255, 165, 92, 1) !important;
|
||||
color: rgba(255, 165, 92, 1) !important;
|
||||
}
|
||||
|
||||
::v-deep .content input.YJ-custom-checkbox[type='checkbox'] {
|
||||
border: 1px solid rgba(var(--color-base1), 1) !important;
|
||||
background-color: unset !important;
|
||||
}
|
||||
|
||||
::v-deep .iconBut {
|
||||
background: unset !important;
|
||||
border: unset !important;
|
||||
|
||||
@ -122,10 +122,16 @@
|
||||
</template>
|
||||
<template #footer>
|
||||
<button id="routeQuery" @clik="routeQuery">
|
||||
<svg class="icon-query"><use xlink:href="#yj-icon-query"></use></svg>查询
|
||||
<svg class="icon-query">
|
||||
<use xlink:href="#yj-icon-query"></use>
|
||||
</svg>
|
||||
查询
|
||||
</button>
|
||||
<button id="clearRoute" @click="clearRoute">
|
||||
<svg class="icon-route"><use xlink:href="#yj-icon-route"></use></svg>清除路线
|
||||
<svg class="icon-route">
|
||||
<use xlink:href="#yj-icon-route"></use>
|
||||
</svg>
|
||||
清除路线
|
||||
</button>
|
||||
<button @click="close">取消</button>
|
||||
</template>
|
||||
@ -133,6 +139,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
//@ts-nocheck
|
||||
import {ref, reactive, onBeforeUnmount} from 'vue'
|
||||
import {inject} from 'vue'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
@ -207,6 +214,7 @@ const open = () => {
|
||||
routePlanning.createRoute(res.data.routes[0]?.points)
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
document.getElementById('clearRoute').click()
|
||||
}
|
||||
}
|
||||
@ -244,7 +252,8 @@ const routeQuery = async (e) => {
|
||||
waypoints: []
|
||||
})
|
||||
}
|
||||
const clearRoute = (e) => {}
|
||||
const clearRoute = (e) => {
|
||||
}
|
||||
const pickStartPos = () => {
|
||||
routePlanning.pickStartPos((position) => {
|
||||
startLng.value = position.lng
|
||||
@ -317,14 +326,17 @@ defineExpose({
|
||||
left: 10px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#clearRoute {
|
||||
position: absolute;
|
||||
left: 95px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog > .content .row > .col {
|
||||
margin: 0 5px !important;
|
||||
}
|
||||
|
||||
.crossPoint:hover {
|
||||
color: rgba(var(--color-base1), 1);
|
||||
}
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
<div class="col attribute-select-box">
|
||||
<span class="label" style="line-height: 32px">{{ t('general.内容类型') }}</span>
|
||||
<el-select style="width: 175px" v-model="attributeType" @change="attributeChange" placeholder="请选择">
|
||||
<el-option v-for="item in attributeSelect" :key="item.key" :label="t('general.' + item.name)" :value="item.key">
|
||||
<el-option v-for="item in attributeSelect" :key="item.key" :label="t('general.' + item.name)"
|
||||
:value="item.key">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@ -46,7 +47,10 @@
|
||||
</div>
|
||||
<div class="td" v-else>{{ item.url }}</div>
|
||||
<div class="td operation" v-if="linkEditActive.index === index">
|
||||
<button style="width: 76px;flex: 0 0 76px" @click="linkConfirmEdit(index)">{{ t('general.确认') }}</button>
|
||||
<button style="width: 76px;flex: 0 0 76px" @click="linkConfirmEdit(index)">{{
|
||||
t('general.确认')
|
||||
}}
|
||||
</button>
|
||||
<button style="width: 76px;flex: 0 0 76px" @click="linkCancelEdit">{{ t('general.取消') }}</button>
|
||||
</div>
|
||||
<div class="td operation" v-else>
|
||||
@ -66,7 +70,9 @@
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.编辑内容') }}</span>
|
||||
<input class="input" type="text" v-model="cameraParams.keyWord" style="width: 180px;margin-right: 10px;"/>
|
||||
<button class="select btn" @click="cameraSelect({page: 1, limit: cameraParams.pageSize })">{{ t('general.搜索') }}</button>
|
||||
<button class="select btn" @click="cameraSelect({page: 1, limit: cameraParams.pageSize })">
|
||||
{{ t('general.搜索') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@ -104,7 +110,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<Pagination :total="cameraParams.total" v-model:page="cameraParams.page" v-model:limit="cameraParams.pageSize" :pageSizes="false" @pagination="cameraSelect" />
|
||||
<Pagination :total="cameraParams.total" v-model:page="cameraParams.page" v-model:limit="cameraParams.pageSize"
|
||||
:pageSizes="false" @pagination="cameraSelect"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="attribute-content attribute-content-isc" v-show="attributeType === 'isc'">
|
||||
@ -275,6 +282,7 @@ import { inject } from 'vue'
|
||||
import {deviceApi} from '@/api/deviceManage'
|
||||
import {MaterialApi} from '@/api/material'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
||||
const {t} = useI18n()
|
||||
|
||||
let ipcRenderer;
|
||||
@ -357,8 +365,7 @@ const goodsSelect = async (page) => {
|
||||
const cameraSelect = ({page, limit}) => {
|
||||
if (!props.entityOptions.attributeSelect) {
|
||||
return
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
let flag = false
|
||||
for (let i = 0; i < props.entityOptions.attributeSelect.length; i++) {
|
||||
if (props.entityOptions.attributeSelect[i].key === 'camera') {
|
||||
@ -494,8 +501,7 @@ const _addLink = async () => {
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// const pickerOpts = {
|
||||
// types: [
|
||||
// {
|
||||
@ -634,7 +640,7 @@ const _addRtmp = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const rtmpEdit = (index: any, item: { name: any; url: any; }) => {
|
||||
const rtmpEdit = (index: any, item: { name: any; url: any; id: any }) => {
|
||||
let active = {
|
||||
index: index,
|
||||
name: item.name,
|
||||
@ -654,7 +660,8 @@ const rtmpCancelEdit = () => {
|
||||
rtmpEditActive.value = {}
|
||||
}
|
||||
|
||||
const attributeChange = () => { }
|
||||
const attributeChange = () => {
|
||||
}
|
||||
|
||||
const changeAttributeGoods = (item) => {
|
||||
let flag = false
|
||||
@ -664,8 +671,7 @@ const changeAttributeGoods = (item) => {
|
||||
flag = true
|
||||
if (item.cnt) {
|
||||
props.entityOptions.attributeGoods[m].cnt = item.cnt
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
props.entityOptions.attributeGoods.splice(m, 1)
|
||||
}
|
||||
break
|
||||
@ -743,6 +749,7 @@ const changeAttributeCamera = (e) => {
|
||||
width: 150px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.dialog-en > .content .attribute-content-link .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.dialog-en > .content .attribute-content-link .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.dialog-en > .content .attribute-content-vr .table .tr .th:nth-child(3),
|
||||
@ -811,24 +818,28 @@ const changeAttributeCamera = (e) => {
|
||||
width: 100px;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .th,
|
||||
.YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .td {
|
||||
flex: 0 0 110px;
|
||||
width: 110px;
|
||||
min-width: 110px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .th:nth-of-type(3),
|
||||
.YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .td:nth-of-type(3) {
|
||||
flex: 0 0 110px !important;
|
||||
width: 110px !important;
|
||||
min-width: 110px !important;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .th:nth-of-type(5),
|
||||
.YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .td:nth-of-type(5) {
|
||||
flex: 0 0 95px !important;
|
||||
width: 95px !important;
|
||||
min-width: 95px !important;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .th:nth-of-type(6),
|
||||
.YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .td:nth-of-type(6) {
|
||||
flex: 0 0 95px !important;
|
||||
|
||||
Reference in New Issue
Block a user