This commit is contained in:
zyl
2025-12-22 17:28:40 +08:00
parent 8a9560bb17
commit cf113a0137
4 changed files with 42 additions and 8 deletions

View File

@ -1,7 +1,7 @@
server:
host: 127.0.0.1
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:
global:
enabled: false

View File

@ -106,6 +106,18 @@ const initTreeCallBack = () => {
TsApi.queryTsSource(formData).then(async res => {
console.log('queryTsSource', res)
if (res.code == 200) {
res.data.sort((a: any, b: any) => {
if ((a.treeIndex || a.treeIndex == 0) && (b.treeIndex || b.treeIndex == 0)) {
return a.treeIndex - b.treeIndex
}
if (a.treeIndex) {
return -1;
}
if (b.treeIndex) {
return 1;
}
return 0;
});
for (let i = res.data.length - 1; i >= 0; i--) {
res.data[i].svg = await cusNodeIcon(res.data[i]);

View File

@ -217,14 +217,24 @@ const lists = ref([])
const elementList = ref([])
let input2 = ref('')
watch(input2, (val) => {
console.log("activIndex", activIndex.value)
console.log("input2", val)
console.log("lists", lists)
console.log("lists", lists.value.filter(item => item.name.includes(val)))
if (dataType.value == 'tree') {
if (activIndex.value == 0) {
getModelTypeList(input2.value)
} else if (activIndex.value == 1) {
getGraphTypeList(input2.value)
}
} else {
if (val == '') {
handleTabClick(tabs[activIndex.value], activIndex.value)
} else {
lists.value = lists.value.filter(item => item.name.includes(val))
}
}
treeRef.value && treeRef.value!.filter(val)
})
// 当前选择类型的Id
@ -240,6 +250,7 @@ const filterNode = (value: string, data: Tree) => {
const handleTabClick = (item, index) => {
activIndex.value = index
currentTypeId.value = ""
input2.value = ""
elementList.value = []
console.log(item)
@ -290,14 +301,21 @@ const getModelListByType = (id) => {
}
}
// 获取模型类型列表
let getModelTypeList = async () => {
let res = await ModelApi.modelTypeList()
let getModelTypeList = async (modelName = null) => {
let Obj = {modelName}
if (modelName == null)
delete Obj.modelName
let res = await ModelApi.modelTypeList(Obj)
if (res.code == 200) {
modelTypes.value = res.data
treeData.value = modelTypes.value
}
}
let getGraphTypeList = async () => {
let res = await GraphApi.modelTypeList()
let getGraphTypeList = async (militaryName = null) => {
let Obj = {militaryName}
if (militaryName == null)
delete Obj.militaryName
let res = await GraphApi.modelTypeList(Obj)
if (res.code == 200) {
graphTypes.value = res.data
}

View File

@ -219,8 +219,12 @@ const handleNodeClick = (data: Tree, node, TreeNode, event) => {
form.name = data.name + '-' + zNode.value.sourceName
}
const drawLine = () => {
$(".newEvent")[0].style.display = "none"
let draw = new YJ.Draw.DrawPolyline(window['earth_ts'])
draw.start((error, p) => {
if (p != undefined) {
$(".newEvent")[0].style.display = "block"
}
positions.value = p
})
}