BUG修改

This commit is contained in:
a0049873 2022-11-24 19:54:20 +08:00
parent 4ba21bd41e
commit 5e9759544d
4 changed files with 359 additions and 361 deletions

View File

@ -65,53 +65,61 @@
</template>
<script>
import { isURL } from "@/utils/validate";
import { isURL } from '@/utils/validate'
export default {
data () {
return {};
return {}
},
methods: {
// tabs, iframe
tabIsIframe (url) {
return isURL(url);
return isURL(url)
},
// tabs, tab
tabSelectedHandle (tab) {
tab = this.$store.state.contentTabs.filter(
(item) => item.name === tab.name
)[0];
)[0]
if (tab) {
this.$router.push({
name: /^iframe_.+/.test(tab.name) ? "iframe" : tab.name,
name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name,
params: { ...tab.params },
query: { ...tab.query },
});
query: { ...tab.query }
})
}
},
// tabs, tab
tabRemoveHandle (tabName) {
if (tabName === "home") {
return false;
if (tabName === 'home') {
return false
}
console.log('删除', this.$store.state.contentTabs)
if (this.$store.state.contentTabs.length !== 1) {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name !== tabName
);
if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName =
this.$store.state.contentTabsActiveName = "home";
return false;
)
} else {
this.$message({
message: '必须打开一个窗口!',
type: 'warning'
})
}
// if (this.$store.state.contentTabs.length <= 0) {
// this.$store.state.sidebarMenuActiveName =
// this.$store.state.contentTabsActiveName = 'home'
// return false
// }
// tab
if (tabName === this.$store.state.contentTabsActiveName) {
let tab =
const tab =
this.$store.state.contentTabs[
this.$store.state.contentTabs.length - 1
];
]
this.$router.push({
name: /^iframe_.+/.test(tab.name) ? "iframe" : tab.name,
name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name,
params: { ...tab.params },
query: { ...tab.query },
});
query: { ...tab.query }
})
}
},
// tabs,
@ -119,21 +127,21 @@ export default {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => {
return (
item.name === "home" ||
item.name === 'home' ||
item.name === this.$store.state.contentTabsActiveName
);
)
}
);
)
},
// tabs,
tabsCloseAllHandle () {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name === "home"
);
this.$router.push({ name: "home" });
},
},
};
(item) => item.name === 'home'
)
this.$router.push({ name: 'home' })
}
}
}
</script>
<style scoped lang="scss">
.aui-content {

View File

@ -1,8 +1,8 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-11-24 14:32:50
* @LastEditors: Light
* @LastEditTime: 2022-11-24 18:04:45
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -117,7 +117,7 @@ export function getPlaceType() {
//西
export function CameraConditionPlaceType(params) {
return axios.post(
`http://${_cameraUrl}/data_service/getCamera/CameraConditionPlaceType'`,
`http://${_cameraUrl}/data_service/getCamera/CameraConditionPlaceType`,
params,
config2
)

View File

@ -118,7 +118,6 @@
{{ child.placeTypeName }}
</div>
</a-tooltip>
</div>
</div>
</div>
@ -163,23 +162,19 @@ export default defineComponent({
mybus.emit('clearLeftSelect')
}
}
}
//
const tabClick = (id) => {
if (chooseId.value === id) {
chooseId.value = ''
mybus.emit('clearLeftSelect')
// mybus.emit('clearLeftSelect')
mybus.emit('CameraConditionPlaceType', [])
} else {
chooseId.value = id
let placeTypeCode = []
placeTypeCode.push(id)
mybus.emit('CameraConditionPlaceType', placeTypeCode)
}
}
//
const init = async () => {
@ -191,7 +186,6 @@ export default defineComponent({
select = ''
}
if (select == '基础设施') {
let res = {}
res = await getCameraInfoByAreaId({
@ -216,8 +210,8 @@ export default defineComponent({
chooseId.value = ''
})
const onSelect = async (item, val, child) => {
let res = {}  
let res = {}
console.log('点击', item, val, child)
res = await getCameraInfoByAreaId({ areaId: val.id })
treeData.value.map((treeDataItem, index) => {
if (item.id == treeDataItem.id) {
@ -236,15 +230,12 @@ export default defineComponent({
selectId.value = child.id
mybus.emit('getCameraByParentId', val.id)
}
}
}
watch(selectId, (newVal) => {
if (newVal == '') {
  mybus.emit('clearLeftSelect')
mybus.emit('getCameraByParentId', '70be8c5b664f4bcf869d82f2e8335051')
}
})
@ -261,7 +252,6 @@ export default defineComponent({
})
}
const showDown = (item, val) => {
selectId.value = val.id
//mybus.emit('getCameraByParentId', val.id)
if (item.children) {

View File

@ -2,7 +2,7 @@
* @Author: Light
* @Date: 2022-11-18 11:53:43
* @LastEditors: Light
* @LastEditTime: 2022-11-24 15:56:51
* @LastEditTime: 2022-11-24 18:12:43
* @Description: 告诉大家这是什么
-->
<template>
@ -386,7 +386,7 @@
<style lang="less" scoped>
.infrastructureApplication {
background: #fff;
position: fixed;
position: absolute;
top: 50%;
right: 0.16rem;
margin-top: -3.9rem;