This commit is contained in:
2025-11-21 16:37:46 +08:00
6 changed files with 240 additions and 138 deletions

View 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
};

View File

@ -39,6 +39,12 @@ export const TsApi = {
data data
}) })
}, },
updateTsSource: async (data: any) => {
return await request.post({
url: '/tsSource/update',
data
})
},
///tsSource/addModelSource ///tsSource/addModelSource
addTsModelSource: async (data: any) => { addTsModelSource: async (data: any) => {
return await request.post({ return await request.post({

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="MouseRight"> <div class="MouseRight">
<div v-for="item in menus" class="item" @click="item.fun"> <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 }} {{ item.name }}
</div> </div>
</div> </div>
@ -15,7 +15,7 @@ import {useRightOperate} from './rightOperate'
let {delNode, addEvent} = useRightOperate() let {delNode, addEvent} = useRightOperate()
const eventBus = inject("bus"); const eventBus: any = inject("bus");
let setOrReset = ref(1) let setOrReset = ref(1)
let setView = (flag) => { let setView = (flag) => {
// let cusView = window['YJ'].Global.getCurrentView(window['earth_ts']) // let cusView = window['YJ'].Global.getCurrentView(window['earth_ts'])
@ -74,7 +74,7 @@ let menus = ref([
]) ])
eventBus.on("initMenus", () => { eventBus.on("initMenus", () => {
let customView = null let customView
let entity = window['_entityMap'].get(window['selectedIdTs']) let entity = window['_entityMap'].get(window['selectedIdTs'])
customView = Boolean(entity.customView && entity.customView.orientation) customView = Boolean(entity.customView && entity.customView.orientation)
setOrReset.value = customView ? 0 : 1 setOrReset.value = customView ? 0 : 1

View File

@ -14,7 +14,7 @@
<div class="row"> <div class="row">
<div class="col" style="flex: 0 0 205px"> <div class="col" style="flex: 0 0 205px">
<span class="label">名称</span> <span class="label">名称</span>
<input class="input" type="text" name="name" placeholder="请输入名称" /> <input class="input" type="text" name="name" placeholder="请输入名称"/>
</div> </div>
<!-- <div class="col"> <!-- <div class="col">
<input <input
@ -127,7 +127,10 @@
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
<button class="add-point" style="margin-left: 10px"> <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> </button>
</div> </div>
</div> </div>
@ -192,13 +195,18 @@
<template #footer> <template #footer>
<div style="position: absolute; left: 24px; display: flex"> <div style="position: absolute; left: 24px; display: flex">
<button class="afreshPlay"> <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>
<button class="cease" style="margin-left: 10px"> <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>
<button class="video" style="margin-left: 10px" @click="startVideo"> <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> </button>
</div> </div>
<button class="saveRoam" @click="draw">保存</button> <button class="saveRoam" @click="draw">保存</button>
@ -208,18 +216,19 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onBeforeUnmount } from 'vue' //@ts-nocheck
import { inject } from 'vue' import {ref, reactive, onBeforeUnmount} from 'vue'
import { useI18n } from 'vue-i18n' import {inject} from 'vue'
import {useI18n} from 'vue-i18n'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
import { app } from 'electron' import {app} from 'electron'
import { TreeApi } from '@/api/tree' import {TreeApi} from '@/api/tree'
import { useTreeNode } from '../tree/hooks/treeNode' import {useTreeNode} from '../tree/hooks/treeNode'
import { ElMessage } from 'element-plus' import {ElMessage} from 'element-plus'
import { $sendElectronChanel } from '@/utils/communication' import {$sendElectronChanel} from '@/utils/communication'
const { t } = useI18n() const {t} = useI18n()
const { cusAddNodes } = useTreeNode() const {cusAddNodes} = useTreeNode()
const baseDialog: any = ref(null) const baseDialog: any = ref(null)
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
@ -231,14 +240,14 @@ eventBus.on('flyRoamDialog', () => {
show.value = true show.value = true
baseDialog.value?.open() baseDialog.value?.open()
setTimeout(() => { setTimeout(() => {
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw) flyRoam = YJ.Global.FlyRoam.open(window.earth, {repeat: Infinity}, {}, draw)
}, 100) }, 100)
}) })
const open = () => { const open = () => {
show.value = true show.value = true
baseDialog.value?.open() baseDialog.value?.open()
setTimeout(() => { setTimeout(() => {
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw) flyRoam = YJ.Global.FlyRoam.open(window.earth, {repeat: Infinity}, {}, draw)
}, 100) }, 100)
} }
const draw = (data) => { const draw = (data) => {
@ -293,7 +302,8 @@ const startVideo = () => {
window.addEventListener('keydown', handleKeyDown) window.addEventListener('keydown', handleKeyDown)
} }
const clangeViewPointHeight = () => {} const clangeViewPointHeight = () => {
}
const viewPointHeightInput = () => { const viewPointHeightInput = () => {
let dom: any = document.getElementById('viewPointHeight') let dom: any = document.getElementById('viewPointHeight')
if (viewPointHeight.value < dom.min * 1) { if (viewPointHeight.value < dom.min * 1) {
@ -324,28 +334,29 @@ defineExpose({
<style scoped lang="scss"> <style scoped lang="scss">
.afreshPlay { .afreshPlay {
background: background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
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; 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; border: 1px solid rgba(27, 248, 195, 1) !important;
color: rgba(27, 248, 195, 1) !important; color: rgba(27, 248, 195, 1) !important;
svg { svg {
fill: rgba(27, 248, 195, 1) !important; fill: rgba(27, 248, 195, 1) !important;
} }
} }
.cease { .cease {
background: background: linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%),
linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%),
rgba(0, 0, 0, 0.5) !important; rgba(0, 0, 0, 0.5) !important;
border: 1px solid rgba(241, 108, 85, 1) !important; border: 1px solid rgba(241, 108, 85, 1) !important;
color: rgba(241, 108, 85, 1) !important; color: rgba(241, 108, 85, 1) !important;
svg { svg {
fill: rgba(241, 108, 85, 1) !important; fill: rgba(241, 108, 85, 1) !important;
} }
} }
.video { .video {
background: background: linear-gradient(
linear-gradient(
180deg, 180deg,
rgba(71, 27, 5, 0.3) 0%, rgba(71, 27, 5, 0.3) 0%,
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; border: 1px solid rgba(255, 165, 92, 1) !important;
color: rgba(255, 165, 92, 1) !important; color: rgba(255, 165, 92, 1) !important;
} }
::v-deep .content input.YJ-custom-checkbox[type='checkbox'] { ::v-deep .content input.YJ-custom-checkbox[type='checkbox'] {
border: 1px solid rgba(var(--color-base1), 1) !important; border: 1px solid rgba(var(--color-base1), 1) !important;
background-color: unset !important; background-color: unset !important;
} }
::v-deep .iconBut { ::v-deep .iconBut {
background: unset !important; background: unset !important;
border: unset !important; border: unset !important;

View File

@ -122,10 +122,16 @@
</template> </template>
<template #footer> <template #footer>
<button id="routeQuery" @clik="routeQuery"> <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>
<button id="clearRoute" @click="clearRoute"> <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>
<button @click="close">取消</button> <button @click="close">取消</button>
</template> </template>
@ -133,10 +139,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onBeforeUnmount } from 'vue' //@ts-nocheck
import { inject } from 'vue' import {ref, reactive, onBeforeUnmount} from 'vue'
import {inject} from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
import { RouteApi } from '@/api/route/index' import {RouteApi} from '@/api/route/index'
const baseDialog: any = ref(null) const baseDialog: any = ref(null)
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
@ -207,6 +214,7 @@ const open = () => {
routePlanning.createRoute(res.data.routes[0]?.points) routePlanning.createRoute(res.data.routes[0]?.points)
} }
} catch (error) { } catch (error) {
document.getElementById('clearRoute').click() document.getElementById('clearRoute').click()
} }
} }
@ -216,7 +224,7 @@ const open = () => {
//加载路网数据 //加载路网数据
const addRoute = async (fileId) => { const addRoute = async (fileId) => {
let res = await RouteApi.loadRoute({ fileId }) let res = await RouteApi.loadRoute({fileId})
} }
const getList = async () => { const getList = async () => {
let list = await RouteApi.getRouteList() let list = await RouteApi.getRouteList()
@ -244,7 +252,8 @@ const routeQuery = async (e) => {
waypoints: [] waypoints: []
}) })
} }
const clearRoute = (e) => {} const clearRoute = (e) => {
}
const pickStartPos = () => { const pickStartPos = () => {
routePlanning.pickStartPos((position) => { routePlanning.pickStartPos((position) => {
startLng.value = position.lng startLng.value = position.lng
@ -317,14 +326,17 @@ defineExpose({
left: 10px; left: 10px;
display: flex; display: flex;
} }
#clearRoute { #clearRoute {
position: absolute; position: absolute;
left: 95px; left: 95px;
display: flex; display: flex;
} }
.YJ-custom-base-dialog > .content .row > .col { .YJ-custom-base-dialog > .content .row > .col {
margin: 0 5px !important; margin: 0 5px !important;
} }
.crossPoint:hover { .crossPoint:hover {
color: rgba(var(--color-base1), 1); color: rgba(var(--color-base1), 1);
} }

View File

@ -4,7 +4,8 @@
<div class="col attribute-select-box"> <div class="col attribute-select-box">
<span class="label" style="line-height: 32px">{{ t('general.内容类型') }}</span> <span class="label" style="line-height: 32px">{{ t('general.内容类型') }}</span>
<el-select style="width: 175px" v-model="attributeType" @change="attributeChange" placeholder="请选择"> <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-option>
</el-select> </el-select>
</div> </div>
@ -21,7 +22,7 @@
<div class="col"> <div class="col">
<span class="label">{{ t('general.添加链接') }}</span> <span class="label">{{ t('general.添加链接') }}</span>
<div style="flex: 1; position: relative"> <div style="flex: 1; position: relative">
<input class="input link_add" type="text" v-model="addlinkInput" /> <input class="input link_add" type="text" v-model="addlinkInput"/>
<i class="link_add_btn" @click="_addLink"></i> <i class="link_add_btn" @click="_addLink"></i>
</div> </div>
</div> </div>
@ -38,7 +39,7 @@
<div class="table-body" v-if="attribute.link && attribute.link.content && attribute.link.content.length > 0"> <div class="table-body" v-if="attribute.link && attribute.link.content && attribute.link.content.length > 0">
<div class="tr" v-for="(item, index) in attribute.link.content"> <div class="tr" v-for="(item, index) in attribute.link.content">
<div class="td" v-if="linkEditActive.index === index"> <div class="td" v-if="linkEditActive.index === index">
<input class="input" type="text" v-model="linkEditActive.name" /> <input class="input" type="text" v-model="linkEditActive.name"/>
</div> </div>
<div class="td" v-else>{{ item.name }}</div> <div class="td" v-else>{{ item.name }}</div>
<div class="td" v-if="linkEditActive.index === index"> <div class="td" v-if="linkEditActive.index === index">
@ -46,7 +47,10 @@
</div> </div>
<div class="td" v-else>{{ item.url }}</div> <div class="td" v-else>{{ item.url }}</div>
<div class="td operation" v-if="linkEditActive.index === index"> <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> <button style="width: 76px;flex: 0 0 76px" @click="linkCancelEdit">{{ t('general.取消') }}</button>
</div> </div>
<div class="td operation" v-else> <div class="td operation" v-else>
@ -65,8 +69,10 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<span class="label">{{ t('general.编辑内容') }}</span> <span class="label">{{ t('general.编辑内容') }}</span>
<input class="input" type="text" v-model="cameraParams.keyWord" style="width: 180px;margin-right: 10px;" /> <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> </div>
<div> <div>
@ -86,7 +92,7 @@
<div class="tr" v-for="(item, index) in cameraList"> <div class="tr" v-for="(item, index) in cameraList">
<div class="td"> <div class="td">
<input type="checkbox" :value="item.id" v-model="item.checked" <input type="checkbox" :value="item.id" v-model="item.checked"
@change="changeAttributeCamera(item)" /> @change="changeAttributeCamera(item)"/>
<span>{{ t('general.绑定') }}</span> <span>{{ t('general.绑定') }}</span>
</div> </div>
<div class="td">{{ item.cameraName }}</div> <div class="td">{{ item.cameraName }}</div>
@ -104,7 +110,8 @@
</div> </div>
</div> </div>
<div class="row"> <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> </div>
<div class="attribute-content attribute-content-isc" v-show="attributeType === 'isc'"> <div class="attribute-content attribute-content-isc" v-show="attributeType === 'isc'">
@ -127,7 +134,7 @@
<div class="table-body" style="display: none"> <div class="table-body" style="display: none">
<div class="tr"> <div class="tr">
<div class="td"> <div class="td">
<input type="checkbox" value="2" /> <input type="checkbox" value="2"/>
<span>绑定</span> <span>绑定</span>
</div> </div>
<div class="td">设备名称</div> <div class="td">设备名称</div>
@ -148,7 +155,7 @@
<div class="col"> <div class="col">
<span class="label">{{ t('general.添加链接') }}</span> <span class="label">{{ t('general.添加链接') }}</span>
<div style="flex: 1; position: relative"> <div style="flex: 1; position: relative">
<input class="input vr_add" type="text" v-model="addvrInput" /> <input class="input vr_add" type="text" v-model="addvrInput"/>
<i class="vr_add_btn" @click="_addRr"></i> <i class="vr_add_btn" @click="_addRr"></i>
</div> </div>
</div> </div>
@ -165,7 +172,7 @@
<div class="table-body" v-if="attribute.vr && attribute.vr.content && attribute.vr.content.length > 0"> <div class="table-body" v-if="attribute.vr && attribute.vr.content && attribute.vr.content.length > 0">
<div class="tr" v-for="(item, index) in attribute.vr.content"> <div class="tr" v-for="(item, index) in attribute.vr.content">
<div class="td" v-if="vrEditActive.index === index"> <div class="td" v-if="vrEditActive.index === index">
<input class="input" type="text" v-model="vrEditActive.name" /> <input class="input" type="text" v-model="vrEditActive.name"/>
</div> </div>
<div class="td" v-else>{{ item.name }}</div> <div class="td" v-else>{{ item.name }}</div>
<div class="td" v-if="vrEditActive.index === index"> <div class="td" v-if="vrEditActive.index === index">
@ -192,7 +199,7 @@
<div class="col"> <div class="col">
<span class="label">{{ t('general.添加链接') }}</span> <span class="label">{{ t('general.添加链接') }}</span>
<div style="flex: 1; position: relative"> <div style="flex: 1; position: relative">
<input class="input rtmp_add" type="text" v-model="addRtmpInput" /> <input class="input rtmp_add" type="text" v-model="addRtmpInput"/>
<i class="rtmp_add_btn" @click="_addRtmp"></i> <i class="rtmp_add_btn" @click="_addRtmp"></i>
</div> </div>
</div> </div>
@ -209,7 +216,7 @@
<div class="table-body" v-if="attribute.rtmp && attribute.rtmp.content && attribute.rtmp.content.length > 0"> <div class="table-body" v-if="attribute.rtmp && attribute.rtmp.content && attribute.rtmp.content.length > 0">
<div class="tr" v-for="(item, index) in attribute.rtmp.content"> <div class="tr" v-for="(item, index) in attribute.rtmp.content">
<div class="td" v-if="rtmpEditActive.index === index"> <div class="td" v-if="rtmpEditActive.index === index">
<input class="input" type="text" v-model="rtmpEditActive.name" /> <input class="input" type="text" v-model="rtmpEditActive.name"/>
</div> </div>
<div class="td" v-else>{{ item.name }}</div> <div class="td" v-else>{{ item.name }}</div>
<div class="td" v-if="rtmpEditActive.index === index"> <div class="td" v-if="rtmpEditActive.index === index">
@ -270,12 +277,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import {ref} from 'vue'
import { inject } from 'vue' import {inject} from 'vue'
import { deviceApi } from '@/api/deviceManage' import {deviceApi} from '@/api/deviceManage'
import { MaterialApi } from '@/api/material' import {MaterialApi} from '@/api/material'
import { useI18n } from 'vue-i18n' import {useI18n} from 'vue-i18n'
const { t } = useI18n()
const {t} = useI18n()
let ipcRenderer; let ipcRenderer;
if (window && window.process && window.process.type === 'renderer') { if (window && window.process && window.process.type === 'renderer') {
@ -292,7 +300,7 @@ const cameraParams = ref({
page: 1, page: 1,
total: 0 total: 0
}) })
const cameraList:any = ref([]) const cameraList: any = ref([])
const props = defineProps({ const props = defineProps({
entityOptions: { entityOptions: {
@ -354,11 +362,10 @@ const goodsSelect = async (page) => {
goodsFilter() goodsFilter()
console.log('props.entityOptions.attributeGoods', props.entityOptions.attributeGoods) console.log('props.entityOptions.attributeGoods', props.entityOptions.attributeGoods)
} }
const cameraSelect = ({ page, limit }) => { const cameraSelect = ({page, limit}) => {
if (!props.entityOptions.attributeSelect) { if (!props.entityOptions.attributeSelect) {
return return
} } else {
else {
let flag = false let flag = false
for (let i = 0; i < props.entityOptions.attributeSelect.length; i++) { for (let i = 0; i < props.entityOptions.attributeSelect.length; i++) {
if (props.entityOptions.attributeSelect[i].key === 'camera') { if (props.entityOptions.attributeSelect[i].key === 'camera') {
@ -373,7 +380,7 @@ const cameraSelect = ({ page, limit }) => {
cameraParams.value.page = page cameraParams.value.page = page
cameraParams.value.pageSize = limit cameraParams.value.pageSize = limit
let url = "" let url = ""
const params:any = { const params: any = {
cameraName: cameraParams.value.keyWord, cameraName: cameraParams.value.keyWord,
pageNum: cameraParams.value.page, pageNum: cameraParams.value.page,
pageSize: cameraParams.value.pageSize pageSize: cameraParams.value.pageSize
@ -447,7 +454,7 @@ if (props.entityOptions.type === 'BillboardObject') {
}, },
) )
goodsSelect(1) // 物资 goodsSelect(1) // 物资
cameraSelect({page: cameraParams.value.page, limit: cameraParams.value.pageSize }) // ip摄像头 cameraSelect({page: cameraParams.value.page, limit: cameraParams.value.pageSize}) // ip摄像头
} }
@ -476,9 +483,9 @@ const _addLink = async () => {
const options = { const options = {
properties: ['openFile', 'multiSelections'], // 允许选择多个文件 properties: ['openFile', 'multiSelections'], // 允许选择多个文件
filters: [ filters: [
{ name: '图片', extensions: ['jpg', 'jpeg', 'png', 'webp', 'svg', 'bmp'] }, {name: '图片', extensions: ['jpg', 'jpeg', 'png', 'webp', 'svg', 'bmp']},
{ name: '音视频', extensions: ['mp4', 'mp3'] }, {name: '音视频', extensions: ['mp4', 'mp3']},
{ name: 'pdf', extensions: ['pdf'] }, {name: 'pdf', extensions: ['pdf']},
] ]
}; };
if (ipcRenderer) { if (ipcRenderer) {
@ -494,8 +501,7 @@ const _addLink = async () => {
}) })
} }
}); });
} } else {
else {
// const pickerOpts = { // const pickerOpts = {
// types: [ // types: [
// { // {
@ -576,7 +582,7 @@ const _addRr = () => {
const options = { const options = {
properties: ['openFile', 'multiSelections'], properties: ['openFile', 'multiSelections'],
filters: [ filters: [
{ name: '全景图', extensions: ['jpg'] }, {name: '全景图', extensions: ['jpg']},
] ]
}; };
ipcRenderer.send('open-directory-dialog', options); ipcRenderer.send('open-directory-dialog', options);
@ -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 = { let active = {
index: index, index: index,
name: item.name, name: item.name,
@ -654,7 +660,8 @@ const rtmpCancelEdit = () => {
rtmpEditActive.value = {} rtmpEditActive.value = {}
} }
const attributeChange = () => { } const attributeChange = () => {
}
const changeAttributeGoods = (item) => { const changeAttributeGoods = (item) => {
let flag = false let flag = false
@ -664,8 +671,7 @@ const changeAttributeGoods = (item) => {
flag = true flag = true
if (item.cnt) { if (item.cnt) {
props.entityOptions.attributeGoods[m].cnt = item.cnt props.entityOptions.attributeGoods[m].cnt = item.cnt
} } else {
else {
props.entityOptions.attributeGoods.splice(m, 1) props.entityOptions.attributeGoods.splice(m, 1)
} }
break break
@ -681,12 +687,12 @@ const changeAttributeGoods = (item) => {
name: item.name, name: item.name,
cnt: item.cnt, cnt: item.cnt,
} }
props.entityOptions.attributeGoods.push({ ...data }) props.entityOptions.attributeGoods.push({...data})
} }
} }
const changeAttributeCamera = (e) => { const changeAttributeCamera = (e) => {
console.log(e) console.log(e)
props.entityOptions.attributeCamera = [{ ...e }] props.entityOptions.attributeCamera = [{...e}]
for (let i = 0; i < cameraList.value.length; i++) { for (let i = 0; i < cameraList.value.length; i++) {
if (cameraList.value[i].id !== e.id) { if (cameraList.value[i].id !== e.id) {
cameraList.value[i].checked = false cameraList.value[i].checked = false
@ -713,140 +719,145 @@ const changeAttributeCamera = (e) => {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .th:nth-child(1), .YJ-custom-base-dialog > .content .attribute-content-link .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td:nth-child(1), .YJ-custom-base-dialog > .content .attribute-content-link .table .tr .td:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .th:nth-child(1), .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td:nth-child(1), .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .td:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-rtmp .table .tr .th:nth-child(1), .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-rtmp .table .tr .td:nth-child(1) { .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td:nth-child(1) {
width: 164px; width: 164px;
flex: 0 0 164px; flex: 0 0 164px;
} }
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .th:nth-child(2), .YJ-custom-base-dialog > .content .attribute-content-link .table .tr .th:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td:nth-child(2), .YJ-custom-base-dialog > .content .attribute-content-link .table .tr .td:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .th:nth-child(2), .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .th:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td:nth-child(2), .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .td:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-rtmp .table .tr .th:nth-child(2), .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .th:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-rtmp .table .tr .td:nth-child(2) { .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td:nth-child(2) {
width: 226px; width: 226px;
flex: 0 0 226px; flex: 0 0 226px;
} }
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .th:nth-child(3), .YJ-custom-base-dialog > .content .attribute-content-link .table .tr .th:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td:nth-child(3), .YJ-custom-base-dialog > .content .attribute-content-link .table .tr .td:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .th:nth-child(3), .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .th:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td:nth-child(3), .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .td:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-rtmp .table .tr .th:nth-child(3), .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .th:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-rtmp .table .tr .td:nth-child(3) { .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td:nth-child(3) {
flex: 0 0 150px; flex: 0 0 150px;
width: 150px; width: 150px;
justify-content: center; 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-link .table .tr .th:nth-child(3),
.YJ-custom-base-dialog.dialog-en>.content .attribute-content-vr .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 .td:nth-child(3), .YJ-custom-base-dialog.dialog-en > .content .attribute-content-vr .table .tr .th:nth-child(3),
.YJ-custom-base-dialog.dialog-en>.content .attribute-content-rtmp .table .tr .th:nth-child(3), .YJ-custom-base-dialog.dialog-en > .content .attribute-content-vr .table .tr .td:nth-child(3),
.YJ-custom-base-dialog.dialog-en>.content .attribute-content-rtmp .table .tr .td:nth-child(3) { .YJ-custom-base-dialog.dialog-en > .content .attribute-content-rtmp .table .tr .th:nth-child(3),
.YJ-custom-base-dialog.dialog-en > .content .attribute-content-rtmp .table .tr .td:nth-child(3) {
flex: 0 0 190px; flex: 0 0 190px;
width: 190px; width: 190px;
justify-content: center; justify-content: center;
} }
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td .input-group .input, .YJ-custom-base-dialog > .content .attribute-content-link .table .tr .td .input-group .input,
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td .input-group .input, .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .td .input-group .input,
.YJ-custom-base-dialog>.content .attribute-content-rtmp .table .tr .td .input-group .input { .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td .input-group .input {
border-radius: 5px 0 0 5px; border-radius: 5px 0 0 5px;
} }
.YJ-custom-base-dialog>.content .attribute-content-materials .table .tr .th:nth-child(1), .YJ-custom-base-dialog > .content .attribute-content-materials .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-materials .table .tr .td:nth-child(1) { .YJ-custom-base-dialog > .content .attribute-content-materials .table .tr .td:nth-child(1) {
flex: 0 0 60px; flex: 0 0 60px;
} }
.YJ-custom-base-dialog>.content .table.camera-table { .YJ-custom-base-dialog > .content .table.camera-table {
overflow-x: auto; overflow-x: auto;
} }
.YJ-custom-base-dialog>.content .table.isc-table { .YJ-custom-base-dialog > .content .table.isc-table {
overflow: hidden; overflow: hidden;
} }
.YJ-custom-base-dialog>.content .table.camera-table .tr { .YJ-custom-base-dialog > .content .table.camera-table .tr {
display: inline-flex; display: inline-flex;
} }
.YJ-custom-base-dialog>.content .table.isc-table .tr { .YJ-custom-base-dialog > .content .table.isc-table .tr {
display: flex; display: flex;
} }
.YJ-custom-base-dialog>.content .table.camera-table .tr:last-child, .YJ-custom-base-dialog > .content .table.camera-table .tr:last-child,
.YJ-custom-base-dialog>.content .table.isc-table .tr:last-child { .YJ-custom-base-dialog > .content .table.isc-table .tr:last-child {
border-bottom: 1px solid rgba(var(--color-base1), 0.5); border-bottom: 1px solid rgba(var(--color-base1), 0.5);
} }
.YJ-custom-base-dialog>.content .table.camera-table .tr .td span, .YJ-custom-base-dialog > .content .table.camera-table .tr .td span,
.YJ-custom-base-dialog>.content .table.isc-table .tr .td span { .YJ-custom-base-dialog > .content .table.isc-table .tr .td span {
white-space: nowrap; white-space: nowrap;
margin-left: 10px; margin-left: 10px;
} }
.YJ-custom-base-dialog>.content .table.camera-table .tr .td input[type=checkbox], .YJ-custom-base-dialog > .content .table.camera-table .tr .td input[type=checkbox],
.YJ-custom-base-dialog>.content .table.isc-table .tr .td input[type=checkbox] { .YJ-custom-base-dialog > .content .table.isc-table .tr .td input[type=checkbox] {
cursor: pointer; cursor: pointer;
} }
.YJ-custom-base-dialog>.content .table.camera-table .table-body, .YJ-custom-base-dialog > .content .table.camera-table .table-body,
.YJ-custom-base-dialog>.content .table.isc-table .table-body { .YJ-custom-base-dialog > .content .table.isc-table .table-body {
display: inline-flex; display: inline-flex;
flex-direction: column; flex-direction: column;
height: 186px; height: 186px;
width: auto; width: auto;
} }
.YJ-custom-base-dialog>.content .table.camera-table .tr .th, .YJ-custom-base-dialog > .content .table.camera-table .tr .th,
.YJ-custom-base-dialog>.content .table.camera-table .tr .td { .YJ-custom-base-dialog > .content .table.camera-table .tr .td {
flex: 0 0 100px; flex: 0 0 100px;
width: 100px; width: 100px;
min-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 { .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; flex: 0 0 110px;
width: 110px; width: 110px;
min-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) { .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; flex: 0 0 110px !important;
width: 110px !important; width: 110px !important;
min-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) { .YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .th:nth-of-type(5),
flex: 0 0 95px !important; .YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .td:nth-of-type(5) {
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; flex: 0 0 95px !important;
width: 95px !important; width: 95px !important;
min-width: 95px !important; min-width: 95px !important;
} }
.YJ-custom-base-dialog>.content .table.isc-table .tr .th, .YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .th:nth-of-type(6),
.YJ-custom-base-dialog>.content .table.isc-table .tr .td { .YJ-custom-base-dialog.dialog-en > .content .table.camera-table .tr .td:nth-of-type(6) {
flex: 0 0 95px !important;
width: 95px !important;
min-width: 95px !important;
}
.YJ-custom-base-dialog > .content .table.isc-table .tr .th,
.YJ-custom-base-dialog > .content .table.isc-table .tr .td {
flex: 1; flex: 1;
width: auto; width: auto;
min-width: auto; min-width: auto;
} }
.YJ-custom-base-dialog>.content .table.camera-table .tr .th:first-child, .YJ-custom-base-dialog > .content .table.camera-table .tr .th:first-child,
.YJ-custom-base-dialog>.content .table.camera-table .tr .td:first-child, .YJ-custom-base-dialog > .content .table.camera-table .tr .td:first-child,
.YJ-custom-base-dialog>.content .table.isc-table .tr .th:first-child, .YJ-custom-base-dialog > .content .table.isc-table .tr .th:first-child,
.YJ-custom-base-dialog>.content .table.isc-table .tr .td:first-child { .YJ-custom-base-dialog > .content .table.isc-table .tr .td:first-child {
flex: 0 74px; flex: 0 74px;
min-width: 74px; min-width: 74px;
} }