This commit is contained in:
zyl
2025-11-20 18:50:58 +08:00
30 changed files with 402 additions and 223 deletions

View File

@ -1,7 +1,7 @@
server: server:
host: 127.0.0.1 host: 127.0.0.1
port: 8848 port: 8848
path: C:\Users\MSI\AppData\Roaming\dzsp_shijingjun_offline_Y_save path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save
poi: poi:
global: global:
enabled: false enabled: false

View File

@ -20,12 +20,10 @@ declare module 'vue' {
ElDialog: typeof import('element-plus/es')['ElDialog'] ElDialog: typeof import('element-plus/es')['ElDialog']
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage'] ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElRow: typeof import('element-plus/es')['ElRow'] ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElSlider: typeof import('element-plus/es')['ElSlider'] ElSlider: typeof import('element-plus/es')['ElSlider']

View File

@ -511,6 +511,7 @@
overflow-y: auto; overflow-y: auto;
scrollbar-gutter: stable; scrollbar-gutter: stable;
width: calc(100% + 1px); width: calc(100% + 1px);
height: 194px;
} }
.YJ-custom-base-dialog>.content .table .align-center, .YJ-custom-base-dialog>.content .table .align-center,

View File

@ -688,6 +688,9 @@
}, },
nodeTitle: function (setting, node) { nodeTitle: function (setting, node) {
var t = setting.data.key.title === '' ? setting.data.key.name : setting.data.key.title var t = setting.data.key.title === '' ? setting.data.key.name : setting.data.key.title
if(!node[t]) {
t = setting.data.key.name
}
var rawTitle = '' + node[t] var rawTitle = '' + node[t]
if (typeof setting.data.render.title === 'function') { if (typeof setting.data.render.title === 'function') {
return setting.data.render.title.call(this, rawTitle, node) return setting.data.render.title.call(this, rawTitle, node)
@ -1489,6 +1492,7 @@
html.push('</a>') html.push('</a>')
}, },
makeDOMNodeNameBefore: function (html, setting, node) { makeDOMNodeNameBefore: function (html, setting, node) {
console.log('=================', setting, node)
var title = data.nodeTitle(setting, node), var title = data.nodeTitle(setting, node),
url = view.makeNodeUrl(setting, node), url = view.makeNodeUrl(setting, node),
fontcss = view.makeNodeFontCss(setting, node), fontcss = view.makeNodeFontCss(setting, node),

View File

@ -96,6 +96,10 @@ window.newFuzzySearch = function (
let str = '<span style="color: whitesmoke;background-color: darkred;">' + h + '</span>' let str = '<span style="color: whitesmoke;background-color: darkred;">' + h + '</span>'
return str return str
}) })
item.title = item.oldname.replace(F, function (h) {
let str = h
return str
})
// let a = item.name // let a = item.name
// a = '<span style="color: whitesmoke;background-color: darkred;">' + a + "</span>" // a = '<span style="color: whitesmoke;background-color: darkred;">' + a + "</span>"

View File

@ -85,8 +85,12 @@ service.interceptors.response.use(
if (response.data.code == 401) { if (response.data.code == 401) {
router.push('/') router.push('/')
localStorage.removeItem('Authorization') localStorage.removeItem('Authorization')
ElMessage({
message: "登录过期,请重新登录",
type: 'error'
})
} }
if (![0, 200].includes(response.data.code)) { else if (![0, 200].includes(response.data.code)) {
ElMessage({ ElMessage({
message: response.data.msg || response.data.message, message: response.data.msg || response.data.message,
type: 'error' type: 'error'

View File

@ -10,13 +10,22 @@ export const addMapSource = async ({type, id, sourceName = '未命名对象', op
let options: any = await initMapData(type, opt, null) let options: any = await initMapData(type, opt, null)
let selectedNodes = window.treeObj.getSelectedNodes() let selectedNodes = window.treeObj.getSelectedNodes()
let node = selectedNodes && selectedNodes[selectedNodes.length - 1] let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
function getParentId(nd: any) {
if (nd.sourceType === 'directory') {
return nd.id
} else {
let parentNode = window.treeObj.getNodeByParam("id", nd.parentId, null);
if(parentNode) {
return getParentId(parentNode)
}
else {
return
}
}
}
let parentId let parentId
if (node) { if (node) {
if (node.sourceType === 'directory') { parentId = getParentId(node)
parentId = node.id
} else {
parentId = node.parentId
}
} }
delete options.host delete options.host
if(options.attribute && options.attribute.rtmp) { if(options.attribute && options.attribute.rtmp) {

View File

@ -150,7 +150,7 @@ let pageSize: any = ref(10)
let pageNum: any = ref(1) let pageNum: any = ref(1)
let total: any = ref(0) let total: any = ref(0)
const back = () => { const back = () => {
ipcRenderer.send('toggle-fullscreen', false) // ipcRenderer.send('toggle-fullscreen', false)
router.push({path: '/home'}) router.push({path: '/home'})
} }
const handleSizeChange = (val) => { const handleSizeChange = (val) => {

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="bottomMenuBox zIndex9" ref="bottomMenuBox"> <div class="bottomMenuBox zIndex9" ref="bottomMenuBox">
<div class="animate__animated bottomMenu"> <div class="animate__animated bottomMenu">
<div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i" :title="t('bottomMenu.' + item.sourceType)"> <div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i">
<div class="bottom_box_content" @click="addMarker(item, $event)"> <div class="bottom_box_content" @click="addMarker(item, $event)" :title="t('bottomMenu.' + item.sourceType)">
<svg class="bottom_box_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <svg class="bottom_box_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none" width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none"
preserveAspectRatio="none"> preserveAspectRatio="none">
@ -40,7 +40,7 @@
</div> </div>
<div class="bottom_children" v-if="item.children" v-show="item.childrenShow"> <div class="bottom_children" v-if="item.children" v-show="item.childrenShow">
<div class="bottom_childre_box" v-for="(item2, m) of item.children" :key="m" <div class="bottom_childre_box" v-for="(item2, m) of item.children" :key="m"
@click="addMarker(item2, $event)"> @click="addMarker(item2, $event)" :title="t('bottomMenu.' + item2.sourceType)">
<svg class="bottom_childre_box_bg" xmlns="http://www.w3.org/2000/svg" <svg class="bottom_childre_box_bg" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="6vw" height="44.5" viewBox="0 0 119 35.5" fill="none" xmlns:xlink="http://www.w3.org/1999/xlink" width="6vw" height="44.5" viewBox="0 0 119 35.5" fill="none"
preserveAspectRatio="none"> preserveAspectRatio="none">
@ -595,6 +595,7 @@ const fold = () => {
const itemDuration = 300 const itemDuration = 300
if (isFolded.value) { if (isFolded.value) {
// 展开状态 // 展开状态
bottomMenuBox.value.style.pointerEvents = 'unset'
items.forEach((item: any, index) => { items.forEach((item: any, index) => {
setTimeout(() => { setTimeout(() => {
item.style.transition = 'transform 0.3s ease' item.style.transition = 'transform 0.3s ease'
@ -606,6 +607,7 @@ const fold = () => {
bottom_left.style.transform = 'rotate(270deg)' bottom_left.style.transform = 'rotate(270deg)'
} else { } else {
// 折叠状态 // 折叠状态
bottomMenuBox.value.style.pointerEvents = 'none'
items.forEach((item: any, index: any) => { items.forEach((item: any, index: any) => {
setTimeout(() => { setTimeout(() => {
item.style.transition = 'transform 0.3s ease' item.style.transition = 'transform 0.3s ease'
@ -817,6 +819,7 @@ document.addEventListener('click', (e: any) => {
transition: all 0.3s ease; transition: all 0.3s ease;
transform: rotate(270deg); transform: rotate(270deg);
cursor: pointer; cursor: pointer;
pointer-events: all;
>svg { >svg {
width: 100%; width: 100%;

View File

@ -38,10 +38,12 @@
</div> </div>
<div class="file_name"> <div class="file_name">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<span>{{ item.createdAt }}</span> <span class="pdfPath" :title="item.path">{{ item.path }}</span>
</div> </div>
</div> </div>
<div class="item_right"> <div class="item_right">
<span style="color: rgba(var(--color-text2), 1)">{{ item.createdAt }}</span>
<div class="but">
<span v-if="item.isEnable">已启用</span> <span v-if="item.isEnable">已启用</span>
<el-button <el-button
@ -64,6 +66,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="line"></div> <div class="line"></div>
<div class="engineering_title2"> <div class="engineering_title2">
<span class="fankuai"></span> <span class="fankuai"></span>
@ -91,10 +94,13 @@
</div> </div>
<div class="file_name"> <div class="file_name">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<span>{{ item.createdAt }}</span> <!-- <span>{{ item.createdAt }}</span> -->
<span class="pdfPath" :title="item.path">{{ item.path }}</span>
</div> </div>
</div> </div>
<div class="item_right"> <div class="item_right">
<span style="color: rgba(var(--color-text2), 1)">{{ item.createdAt }}</span>
<div class="but">
<span v-if="item.isEnable">已启用</span> <span v-if="item.isEnable">已启用</span>
<el-button <el-button
@ -117,6 +123,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="line"></div> <div class="line"></div>
<div class="engineering_title2"> <div class="engineering_title2">
<span class="fankuai"></span> <span class="fankuai"></span>
@ -242,6 +249,10 @@ const poiImport = () => {
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)
poiList.map((item) => {
let arr = item.path.split('/')
item.name = arr[arr.length - 1]
})
//只有一个poi时默认启用 //只有一个poi时默认启用
if (poiList.length == 1) { if (poiList.length == 1) {
let formData = new FormData() let formData = new FormData()
@ -390,6 +401,10 @@ var routeList: any = reactive([])
const getList = async () => { const getList = async () => {
let list = await RouteApi.getRouteList() let list = await RouteApi.getRouteList()
routeList.splice(0, routeList.length, ...list.data) routeList.splice(0, routeList.length, ...list.data)
routeList.map((item) => {
let arr = item.path.split('/')
item.name = arr[arr.length - 1]
})
} }
getList() getList()
@ -398,6 +413,10 @@ var poiList: any = reactive([])
const getPoiList = async () => { const getPoiList = async () => {
let list = await PoiApi.getPoiList() let list = await PoiApi.getPoiList()
poiList.splice(0, poiList.length, ...list.data) poiList.splice(0, poiList.length, ...list.data)
poiList.map((item) => {
let arr = item.path.split('/')
item.name = arr[arr.length - 1]
})
} }
getPoiList() getPoiList()
@ -680,7 +699,7 @@ function derive() {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
line-height: 32px; // padding: 20px 0; line-height: 32px; // padding: 20px 0;
padding: 0 0 20px 0; padding: 0 0 15px 0;
.fankuai { .fankuai {
width: 10px; width: 10px;
height: 10px; height: 10px;
@ -723,10 +742,10 @@ function derive() {
.fileList { .fileList {
width: 100%; width: 100%;
// height: 20vh; // height: 20vh;
max-height: 20vh; max-height: 15vh;
box-sizing: border-box; box-sizing: border-box;
padding: 0 0 20px 0; // padding: 0 0 16px 0;
overflow-y: auto;
.fileList_nav { .fileList_nav {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -734,7 +753,7 @@ function derive() {
overflow-y: auto; /* 垂直方向超出时显示滚动条 */ overflow-y: auto; /* 垂直方向超出时显示滚动条 */
.fileList_nav_item { .fileList_nav_item {
width: 100%; width: 100%;
height: 8vh; height: 7vh;
// background-color: aqua; // background-color: aqua;
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 10px;
@ -759,28 +778,57 @@ function derive() {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-left: 10px; padding-left: 10px;
width: calc(100% - 45px);
} }
} }
} }
} }
// 滚动条优化 // 滚动条优化
.fileList_nav::-webkit-scrollbar { // .fileList::-webkit-scrollbar {
// width: 5px;
// height: 5px;
// }
// .fileList::-webkit-scrollbar-thumb {
// background-color: rgba(var(--color-base1), 1);
// border-radius: 5px;
// }
// .fileList::-webkit-scrollbar-track {
// background-color: rgba(var(--color-base1), 0.2);
// }
}
// 滚动条优化
.fileList::-webkit-scrollbar {
width: 5px; width: 5px;
height: 5px; height: 5px;
} }
.fileList_nav::-webkit-scrollbar-thumb { .fileList::-webkit-scrollbar-thumb {
background-color: rgba(var(--color-base1), 1); background-color: rgba(var(--color-base1), 1);
border-radius: 5px; border-radius: 5px;
} }
.fileList_nav::-webkit-scrollbar-track { .fileList::-webkit-scrollbar-track {
background-color: rgba(var(--color-base1), 0.2); background-color: rgba(var(--color-base1), 0.2);
} }
}
.line { .line {
width: 100%; width: 100%;
height: 1px; height: 1px;
background-color: rgba(204, 204, 204, 0.2); background-color: rgba(204, 204, 204, 0.2);
} }
.pdfPath {
display: inline-block;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: rgba(var(--color-text2), 1);
}
.but {
display: inline-block;
width: 140px;
text-align: right;
margin-left: 10px;
}
</style> </style>

View File

@ -147,9 +147,20 @@ const getTableList = async () => {
} }
getTableList() getTableList()
let func = () => {
eventBus.on('addOptionResuit', () => { console.log('111111')
getTableList() getTableList()
}
// eventBus.on('addOptionResuit', () => {
// console.log('111111')
// getTableList()
// })
onMounted(() => {
eventBus.on('addOptionResuit', func)
})
onUnmounted(() => {
eventBus.off('addOptionResuit', func)
}) })
//------------------添加-------------------- //------------------添加--------------------
@ -232,7 +243,6 @@ const attachUpload = async () => {
const params = new URLSearchParams() const params = new URLSearchParams()
params.append('filePath', path[0]) params.append('filePath', path[0])
deviceApi.uploadSingle(params).then((res) => { deviceApi.uploadSingle(params).then((res) => {
console.log(res, 'res')
ElMessage.success('导入成功') ElMessage.success('导入成功')
getTableList() getTableList()
}) })

View File

@ -23,10 +23,16 @@
</div> </div>
<div class="nav_table"> <div class="nav_table">
<el-table :data="tableData" height="40vh" style="width: 100%"> <el-table
:data="tableData"
:header-cell-style="{ 'text-align': 'center' }"
height="40vh"
style="width: 100%"
>
<el-table-column type="index" label="序号" width="60" align="center" /> <el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column prop="name" label="名称" /> <el-table-column prop="name" label="名称" />
<el-table-column prop="num" label="总计数量" width="120" /> <el-table-column prop="num" label="总计数量" />
<el-table-column prop="unit" label="单位" />
<el-table-column fixed="right" label="操作" width="160"> <el-table-column fixed="right" label="操作" width="160">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" @click="edit('编辑物资', scope.row)"> <el-button type="primary" size="small" @click="edit('编辑物资', scope.row)">
@ -116,9 +122,15 @@ const getTableList = async () => {
} }
getTableList() getTableList()
let func = () => {
eventBus.on('addOptionResuit2', () => {
getTableList() getTableList()
}
onMounted(() => {
eventBus.on('addOptionResuit2', func)
})
onUnmounted(() => {
eventBus.off('addOptionResuit2', func)
}) })
//------------------添加-------------------- //------------------添加--------------------
@ -144,7 +156,7 @@ var edit = (type, row) => {
addForm = JSON.parse(JSON.stringify(row)) addForm = JSON.parse(JSON.stringify(row))
// addForm.areaId = +row.areaId // addForm.areaId = +row.areaId
} }
eventBus.emit('openAddMaterial', { title: type, data: addForm }) eventBus.emit('openAddMaterial', { title: row ? 'edit' : 'add', data: addForm })
} }
var delFun = (row) => { var delFun = (row) => {

View File

@ -25,7 +25,7 @@
</el-button> </el-button>
</div> </div>
<el-input <el-input
v-model="photoName" v-model.trim="photoName"
style="max-width: 150px" style="max-width: 150px"
placeholder="请输入模型名称进行搜索" placeholder="请输入模型名称进行搜索"
class="input-with-select" class="input-with-select"
@ -97,7 +97,7 @@
<template #default="{ row }"> <template #default="{ row }">
<el-image <el-image
style="width: 80px; height: 60px" style="width: 80px; height: 60px"
:src="service + row.posterDataUrl" :src="service + row.posterDataUrl + '?t=' + row.updatedAt"
fit="contain" fit="contain"
/> />
</template> </template>
@ -132,7 +132,7 @@
<!-- 添加类型弹窗 --> <!-- 添加类型弹窗 -->
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="30%" :before-close="handleClose"> <el-dialog v-model="dialogVisible" :title="dialogTitle" width="30%" :before-close="handleClose">
<el-input v-model="modelType" placeholder="请输入模型类型名称" /> <el-input v-model.trim="modelType" placeholder="请输入模型类型名称" />
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog">取消</el-button> <el-button @click="closeDialog">取消</el-button>
@ -522,7 +522,9 @@ const toggleExpand = (row: any) => {
// loadModelsByType(row.id) // loadModelsByType(row.id)
contextMenu.visible && (contextMenu.visible = false) contextMenu.visible && (contextMenu.visible = false)
} }
let clickTypeId = null //存储点击数据,用来删除时更新右侧列表
const getModelListByType = (id) => { const getModelListByType = (id) => {
clickTypeId = id
let formData = new FormData() let formData = new FormData()
formData.append('modelTypeId', id) formData.append('modelTypeId', id)
ModelApi.showModelByType(formData).then((res) => { ModelApi.showModelByType(formData).then((res) => {
@ -624,11 +626,16 @@ const handleDeleteType = (row: TypeNode) => {
}) })
.then(() => { .then(() => {
let formData = new FormData() let formData = new FormData()
formData.append('modelTypeId', row.id) formData.append('modelTypeId', row.id)
ModelApi.delModelType(formData).then((res) => { ModelApi.delModelType(formData).then((res) => {
if (res.code == 0 || res.code == 200) { if (res.code == 0 || res.code == 200) {
ElMessage.success('删除成功') ElMessage.success('删除成功')
getModelList() getModelList()
//如果删除当前选中数据 清空右侧列表
if (row.id === clickTypeId) {
modelList.value = []
}
} }
}) })
}) })

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="leftBox"> <div class="leftBox" ref="leftBoxRef">
<div class="left animate__animated"> <div class="left animate__animated">
<div class="menus"> <div class="menus">
<div class="menus_itemBox" v-for="(item, index) in menuList" :title="t(`firstMenu.${item.name}`)"> <div class="menus_itemBox" v-for="(item, index) in menuList" :title="t(`firstMenu.${item.name}`)">
@ -249,6 +249,7 @@ const menuList: any = ref([
const isFolded: any = ref(false) // 添加折叠状态 const isFolded: any = ref(false) // 添加折叠状态
const initialPositions: any = ref({}) // 保存初始位置 const initialPositions: any = ref({}) // 保存初始位置
const isAnimating: any = ref(false) // 添加动画状态 const isAnimating: any = ref(false) // 添加动画状态
const leftBoxRef = ref()
onMounted(() => { onMounted(() => {
let menusHeight = menuList.value.length * 65 + 'px' let menusHeight = menuList.value.length * 65 + 'px'
let height = menuList.value.length * 65 + 30 + 'px' let height = menuList.value.length * 65 + 30 + 'px'
@ -259,6 +260,8 @@ onMounted(() => {
items.forEach((item: any, index: any) => { items.forEach((item: any, index: any) => {
initialPositions.value[index] = item.style.transform || 'translateX(0)' initialPositions.value[index] = item.style.transform || 'translateX(0)'
}) })
document.addEventListener('click', handleClickOutside, true);
}) })
const leftSideSecondRef = ref() const leftSideSecondRef = ref()
const handleClick = (item: any, e) => { const handleClick = (item: any, e) => {
@ -325,6 +328,7 @@ const fold = () => {
const itemDelay = 100 const itemDelay = 100
const itemDuration = 300 const itemDuration = 300
if (isFolded.value) { if (isFolded.value) {
leftBoxRef.value.style.pointerEvents = 'unset'
left_bottom.style.bottom = '6.5vw' left_bottom.style.bottom = '6.5vw'
left_bottom.style.left = '72px' left_bottom.style.left = '72px'
left_bottom.style.transform = 'rotate(0deg)' left_bottom.style.transform = 'rotate(0deg)'
@ -337,6 +341,7 @@ const fold = () => {
}) })
} else { } else {
// 折叠状态 // 折叠状态
leftBoxRef.value.style.pointerEvents = 'none'
items.forEach((item: any, index: any) => { items.forEach((item: any, index: any) => {
setTimeout(() => { setTimeout(() => {
item.style.transition = 'transform 0.3s ease' item.style.transition = 'transform 0.3s ease'
@ -364,23 +369,16 @@ const fold = () => {
) )
} }
const clickMenu = (item: any) => { // 外部点击的处理函数
console.log(item, 'item') const handleClickOutside = (e) => {
switch (item.key) { if (leftSideSecondRef.value && leftSideSecondRef.value.leftSideSecondRef && !leftSideSecondRef.value.leftSideSecondRef.contains(e.target)) {
case 'analysis': $('.leftSideSecond')[0].style.display = 'none'
console.log('analysis')
// eventBus.emit('analysisDialog')
eventBus.emit('circleViewShedDialog') //添加高程后测试
// eventBus.emit('submergeDialog')
// eventBus.emit('profileDialog')
// eventBus.emit('viewShedDialog')
// eventBus.emit('cutFillDialog')
// eventBus.emit('contourDialog')
break
default:
break
}
} }
};
onBeforeUnmount(() => {
document.removeEventListener('click', handleClickOutside, true);
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -495,6 +493,7 @@ const clickMenu = (item: any) => {
// background-size: 100% 100%; // background-size: 100% 100%;
transition: all 0.3s ease; transition: all 0.3s ease;
cursor: pointer; cursor: pointer;
pointer-events: all;
>svg { >svg {
width: 100%; width: 100%;

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="leftSideSecond"> <div ref="leftSideSecondRef" class="leftSideSecond">
<svg <svg
class="leftSideSecond_bg" class="leftSideSecond_bg"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -144,7 +144,7 @@ ipcRenderer.invoke('get-available-port').then((port) => {
availablePort.value = port availablePort.value = port
}) })
const obj: any = ref(null) const obj: any = ref(null)
const isclick = ref(false) const leftSideSecondRef = ref(null)
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
const initList = (value) => { const initList = (value) => {
obj.value = value obj.value = value
@ -1029,7 +1029,8 @@ const handleClick = (value = 'projectionDistanceMeasure') => {
methodMap[value]() methodMap[value]()
} }
defineExpose({ defineExpose({
initList initList,
leftSideSecondRef
}) })
</script> </script>
<style> <style>

View File

@ -146,6 +146,7 @@ var submitProtal = () => {
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('操作成功') ElMessage.success('操作成功')
console.log('ccccccccc')
eventBus.emit('addOptionResuit') eventBus.emit('addOptionResuit')
} }
} else { } else {

View File

@ -1,5 +1,6 @@
<template> <template>
<Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 198px)" top="calc(50% - 120px)" :closeCallback="closeCallBack"> <Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 198px)" top="calc(50% - 120px)"
:closeCallback="closeCallBack">
<template #content> <template #content>
<textarea style="height: 40px; width: 348px;" v-model="text"></textarea> <textarea style="height: 40px; width: 348px;" v-model="text"></textarea>
</template> </template>
@ -31,6 +32,10 @@ const open = () => {
baseDialog.value?.open() baseDialog.value?.open()
} }
const confirm = () => { const confirm = () => {
if (!text.value) {
return
}
text.value = text.value.trim()
if (!text.value) { if (!text.value) {
return return
} }
@ -56,13 +61,22 @@ const confirm = () => {
delete options.positions delete options.positions
let selectedNodes = window.treeObj.getSelectedNodes() let selectedNodes = window.treeObj.getSelectedNodes()
let node = selectedNodes && selectedNodes[selectedNodes.length - 1] let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
function getParentId(nd: any) {
if (nd.sourceType === 'directory') {
return nd.id
} else {
let parentNode = window.treeObj.getNodeByParam("id", nd.parentId, null);
if (parentNode) {
return getParentId(parentNode)
}
else {
return
}
}
}
let parentId let parentId
if (node) { if (node) {
if (node.sourceType === 'directory') { parentId = getParentId(node)
parentId = node.id
} else {
parentId = node.parentId
}
} }
let params: any = { let params: any = {
id: id, id: id,

View File

@ -9,15 +9,18 @@
> >
<template #content> <template #content>
<el-form <el-form
label-width="0px" label-width="80px"
style="width: 300px" style="width: 300px"
:model="addForm" :model="addForm"
:rules="peopleRules" :rules="peopleRules"
ref="peopleFormRef" ref="peopleFormRef"
> >
<el-form-item label="" prop="name"> <el-form-item label="物资名称" prop="name">
<el-input v-model.trim="addForm.name" placeholder="请输入物资名称" clearable /> <el-input v-model.trim="addForm.name" placeholder="请输入物资名称" clearable />
</el-form-item> </el-form-item>
<el-form-item label="物资单位" prop="unit">
<el-input v-model.trim="addForm.unit" placeholder="请输入物资单位" clearable />
</el-form-item>
</el-form> </el-form>
</template> </template>
<template #footer> <template #footer>
@ -46,11 +49,13 @@ var addTitle = ref('')
var peopleFormRef: any = ref('') var peopleFormRef: any = ref('')
var addForm: any = ref({ var addForm: any = ref({
name: '' name: '',
unit: ''
}) })
const peopleRules: any = reactive({ const peopleRules: any = reactive({
name: [{ required: true, message: '请输入名称', trigger: 'blur' }] name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
unit: [{ required: true, message: '请输入单位', trigger: 'blur' }]
}) })
var cancel = () => { var cancel = () => {
@ -68,12 +73,14 @@ var submitProtal = () => {
const res = await MaterialApi.add(addForm.value) const res = await MaterialApi.add(addForm.value)
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('操作成功') ElMessage.success('操作成功')
console.log('aaaaaaaaaaaaa')
eventBus.emit('addOptionResuit2') eventBus.emit('addOptionResuit2')
} }
} else { } else {
const res = await MaterialApi.update(addForm.value) const res = await MaterialApi.update(addForm.value)
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('操作成功') ElMessage.success('操作成功')
console.log('bbbbbbbbbbbb')
eventBus.emit('addOptionResuit2') eventBus.emit('addOptionResuit2')
} }
} }
@ -87,13 +94,15 @@ var submitProtal = () => {
} }
eventBus.on('openAddMaterial', (params) => { eventBus.on('openAddMaterial', (params) => {
console.log(params, 'iuiuuiuiu') console.log(params, 'iuiuuiuiu')
addTitle.value = params.title addTitle.value = params.title == 'add' ? '添加物资' : '修改物资'
if (addTitle.value != '添加物资') { if (params.title == 'edit') {
addForm.value.name = params.data.name addForm.value.name = params.data.name
addForm.value.unit = params.data.unit
addForm.value.id = params.data.id addForm.value.id = params.data.id
} else { } else {
addForm.value = { addForm.value = {
name: '' name: '',
unit: ''
} }
} }
baseDialog.value?.open() baseDialog.value?.open()

View File

@ -1,5 +1,6 @@
<template> <template>
<Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 198px)" top="calc(50% - 120px)" :closeCallback="closeCallBack"> <Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 198px)" top="calc(50% - 120px)"
:closeCallback="closeCallBack">
<template #content> <template #content>
<textarea style="height: 40px; width: 348px;" v-model="text"></textarea> <textarea style="height: 40px; width: 348px;" v-model="text"></textarea>
</template> </template>
@ -31,6 +32,10 @@ const open = () => {
baseDialog.value?.open() baseDialog.value?.open()
} }
const confirm = () => { const confirm = () => {
if (!text.value) {
return
}
text.value = text.value.trim()
if (!text.value) { if (!text.value) {
return return
} }
@ -52,15 +57,23 @@ const confirm = () => {
delete options.name delete options.name
let selectedNodes = window.treeObj.getSelectedNodes() let selectedNodes = window.treeObj.getSelectedNodes()
let node = selectedNodes && selectedNodes[selectedNodes.length - 1] let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
let parentId function getParentId(nd: any) {
if (node) { if (nd.sourceType === 'directory') {
if (node.sourceType === 'directory') { return nd.id
parentId = node.id } else {
let parentNode = window.treeObj.getNodeByParam("id", nd.parentId, null);
if (parentNode) {
return getParentId(parentNode)
} }
else { else {
parentId = node.parentId return
} }
} }
}
let parentId
if (node) {
parentId = getParentId(node)
}
let params: any = { let params: any = {
id: id, id: id,

View File

@ -47,9 +47,9 @@ const props = defineProps({
const setInitialStyle = () => { const setInitialStyle = () => {
let style = getdefaultLabelStyle(props.sourceType) let style = getdefaultLabelStyle(props.sourceType)
let defaultStyle = JSON.parse(localStorage.getItem('defaultStyle') || '{}') let defaultStyle = JSON.parse(localStorage.getItem('defaultLabelStyle') || '{}')
defaultStyle[props.sourceType] = style defaultStyle[props.sourceType] = style
localStorage.setItem('defaultStyle', JSON.stringify(defaultStyle)) localStorage.setItem('defaultLabelStyle', JSON.stringify(defaultStyle))
ElMessage({ ElMessage({
message: `新增${props.type}风格设置成功!`, message: `新增${props.type}风格设置成功!`,
type: "success", type: "success",

View File

@ -7,6 +7,6 @@ let defaultLabelStyle = {
} }
} }
//@ts-ignore //@ts-ignore
export const getdefaultLabelStyle = (type) => { export const getdefaultLabelStyle = (type:any) => {
return (type ? defaultLabelStyle[type] : defaultLabelStyle) return (type ? defaultLabelStyle[type] : defaultLabelStyle)
} }

View File

@ -48,6 +48,6 @@ let defaultStyle = {
} }
} }
//@ts-ignore //@ts-ignore
export const getdefaultStyle = (type) => { export const getdefaultStyle = (type:any) => {
return (type ? defaultStyle[type] : defaultStyle) return (type ? defaultStyle[type] : defaultStyle)
} }

View File

@ -126,6 +126,7 @@ const open = async (id: any) => {
}) })
} }
const confirm = () => { const confirm = () => {
entityOptions.value.text = entityOptions.value.text.trim()
entityOptions.value.text = entityOptions.value.text || t("default.untitled") entityOptions.value.text = entityOptions.value.text || t("default.untitled")
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)
let params = structuredClone(that.options) let params = structuredClone(that.options)

View File

@ -13,6 +13,12 @@
<div class="imageCon" ref="threeCanvas"> <div class="imageCon" ref="threeCanvas">
<!-- <img class="image" :src="rowData.thumbnail" alt="" /> --> <!-- <img class="image" :src="rowData.thumbnail" alt="" /> -->
</div> </div>
<span
class="label"
style="display: inline-block; height: 30px; line-height: 30px; padding-left: 10px"
>属性信息</span
>
<span class="custom-divider"></span>
<div class="inputCon"> <div class="inputCon">
<span class="label">模型名称</span> <span class="label">模型名称</span>
<input class="input" maxlength="40" type="text" v-model="rowData.name" /> <input class="input" maxlength="40" type="text" v-model="rowData.name" />
@ -21,7 +27,9 @@
</template> </template>
<template #footer> <template #footer>
<div style="position: absolute; left: -400px; display: flex"> <div style="position: absolute; left: -400px; display: flex">
<button @click="setImage">设置预览图</button> <button @click="setImage">
<svg-icon name="sys_set" :size="14" style="margin-top: -1px"></svg-icon>设置预览图
</button>
</div> </div>
<button @click="save">保存</button> <button @click="save">保存</button>
<button @click="close">关闭</button> <button @click="close">关闭</button>

View File

@ -22,7 +22,8 @@
<span class="label">滚动速度</span> <span class="label">滚动速度</span>
<input type="range" max="100" min="0" step="1" v-model="entityOptions.speed"> <input type="range" max="100" min="0" step="1" v-model="entityOptions.speed">
<div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;"> <div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">
<input class="input" type="number" title="" min="0" max="100" step="1" v-model="entityOptions.speed" @input="$handleInputLimit"> <input class="input" type="number" title="" min="0" max="100" step="1" v-model="entityOptions.speed"
@input="$handleInputLimit">
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
</div> </div>
@ -46,10 +47,13 @@
<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 { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree' import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode' import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { t } = useI18n()
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const baseDialog: any = ref(null); const baseDialog: any = ref(null);
@ -83,6 +87,8 @@ const open = async (id: any) => {
}) })
} }
const confirm = () => { const confirm = () => {
entityOptions.value.text = entityOptions.value.text.trim()
entityOptions.value.text = entityOptions.value.text || t("default.untitled")
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)
let params = structuredClone(that.options) let params = structuredClone(that.options)
baseDialog.value?.close() baseDialog.value?.close()

View File

@ -26,7 +26,7 @@ export function renderVector(node, ifFly = true) {
sourceName: it.name, sourceName: it.name,
isShow: true isShow: true
} }
cusAddNodes(window.treeObj, node.id, [childNode]) cusAddNodes(window.treeObj, node.id, [childNode], true)
let zijiNodes: any = []; let zijiNodes: any = [];
if (it.features && it.features.length) { if (it.features && it.features.length) {
it.features.forEach((item) => { it.features.forEach((item) => {
@ -45,7 +45,7 @@ export function renderVector(node, ifFly = true) {
}); });
} }
cusAddNodes(window.treeObj, childNode.id, zijiNodes) cusAddNodes(window.treeObj, childNode.id, zijiNodes, true)
}); });
} }
} }

View File

@ -512,6 +512,7 @@ export const useTree = () => {
key: { key: {
//zdatas数据中表示节点name的属性key //zdatas数据中表示节点name的属性key
name: 'sourceName', name: 'sourceName',
title: 'title',
checked: 'isShow' checked: 'isShow'
}, },
simpleData: { simpleData: {

View File

@ -532,7 +532,10 @@ export const useTreeNode = () => {
parentNode = treeObj.getNodeByParam('id', parentNodeId, null) parentNode = treeObj.getNodeByParam('id', parentNodeId, null)
} }
let arr = treeObj.addNodes(parentNode, newNodes, isSilent) let arr = treeObj.addNodes(parentNode, newNodes, isSilent)
if(!isSilent) {
treeObj.selectNode(arr[arr.length - 1]) treeObj.selectNode(arr[arr.length - 1])
}
// 确保window.AllNodes存在并为数组 // 确保window.AllNodes存在并为数组
window.AllNodes = (window.AllNodes || []).concat(arr) window.AllNodes = (window.AllNodes || []).concat(arr)
return arr return arr

View File

@ -265,7 +265,9 @@ const isShowTree = debounce(() => {
isShow.value = !isShow.value isShow.value = !isShow.value
const box1: any = document.querySelector('.box1') const box1: any = document.querySelector('.box1')
const arrow: any = document.querySelector('.arrowTree') const arrow: any = document.querySelector('.arrowTree')
const TreeIndex: any = document.querySelector('.TreeIndex')
if (isShow.value) { if (isShow.value) {
TreeIndex.style.pointerEvents = 'none'
// 隐藏box1 // 隐藏box1
box1.style.transform = 'translateX(110%)' box1.style.transform = 'translateX(110%)'
setTimeout(() => { setTimeout(() => {
@ -275,6 +277,7 @@ const isShowTree = debounce(() => {
arrow.style.right = '1em' arrow.style.right = '1em'
}, 100) }, 100)
} else { } else {
TreeIndex.style.pointerEvents = 'unset'
// 显示box1 // 显示box1
arrow.style.transform = 'rotate(180deg)' arrow.style.transform = 'rotate(180deg)'
arrow.style.bottom = '-5px' arrow.style.bottom = '-5px'
@ -582,6 +585,7 @@ defineExpose({
// background-size: 100% 100%; // background-size: 100% 100%;
transition: transform 0.5s ease; transition: transform 0.5s ease;
transform: rotate(180deg); transform: rotate(180deg);
pointer-events: all;
> svg { > svg {
width: 100%; width: 100%;

View File

@ -126,6 +126,8 @@ import addMaterials from '../components/propertyBox/addMaterials.vue'
import { GisApi } from '@/api/gisApi' import { GisApi } from '@/api/gisApi'
import { sysChange as utilsSysChange } from '@/utils/sysChange' import { sysChange as utilsSysChange } from '@/utils/sysChange'
import { getdefaultStyle } from '../components/propertyBox/defaultStyle/style'
import { getdefaultLabelStyle } from '../components/propertyBox/defaultLabelStyle/style'
const { rightMenus } = useRightOperate() const { rightMenus } = useRightOperate()
const firstMenuRef = ref(null) const firstMenuRef = ref(null)
@ -137,6 +139,23 @@ let addStandTextRef = ref()
let tree = ref() let tree = ref()
let selectImgRef = ref() let selectImgRef = ref()
let editdirectoryBox = ref() let editdirectoryBox = ref()
// 标注标绘默认样式
if (!localStorage.getItem('defaultStyle')) {
let defaultStyle = getdefaultStyle(null)
localStorage.setItem('defaultStyle', JSON.stringify(defaultStyle))
}
if (!localStorage.getItem('defaultLabelStyle')) {
let defaultLabelStyle = getdefaultLabelStyle(null)
localStorage.setItem('defaultLabelStyle', JSON.stringify(defaultLabelStyle))
}
eventBus.on('openDialog', async (sourceType: any, id: any) => { eventBus.on('openDialog', async (sourceType: any, id: any) => {
if (dynamicComponentRef.value && dynamicComponentRef.value.close) { if (dynamicComponentRef.value && dynamicComponentRef.value.close) {
dynamicComponentRef.value.close() dynamicComponentRef.value.close()
@ -455,30 +474,30 @@ const createEarth = async () => {
window.earth = await new YJ.YJEarth('earthContainer') window.earth = await new YJ.YJEarth('earthContainer')
let openLeftClick = await new YJ.Global.openLeftClick(window.earth) let openLeftClick = await new YJ.Global.openLeftClick(window.earth)
let openRightClick = await new YJ.Global.openRightClick(window.earth) let openRightClick = await new YJ.Global.openRightClick(window.earth)
// YJ.Global.MouseRightMenu(window.earth, true, (text, object) => { YJ.Global.MouseRightMenu(window.earth, true, (text, object) => {
// switch (text) { switch (text) {
// case 'rotateAround': case 'rotateAround':
// YJ.Global.rotateAround(window.earth, object.position) YJ.Global.rotateAround(window.earth, object.position)
// break break
// case 'textBox': case 'textBox':
// let id = new YJ.Tools().randomString() let id = new YJ.Tools().randomString()
// let name = '文本框' let name = '文本框'
// addMapSource({ addMapSource({
// type: 'textBox', type: 'textBox',
// id: id, id: id,
// sourceName: name, sourceName: name,
// opt: { opt: {
// id: id, id: id,
// position: object.position position: object.position
// } }
// }) })
// break break
// case 'attribute': case 'attribute':
// let node = window.treeObj.getNodeByParam('id', object.id, null) let node = window.treeObj.getNodeByParam('id', object.id, null)
// rightMenus.edit.callback(eventBus, node) rightMenus.edit.callback(eventBus, node)
// break break
// } }
// }) })
tree.value.initTreeCallBack() tree.value.initTreeCallBack()
utilsSysChange(eventBus) utilsSysChange(eventBus)