This commit is contained in:
liuye
2024-08-08 10:44:49 +08:00
parent 077cb2cad2
commit 859a8198fe
4 changed files with 473 additions and 18 deletions

View File

@@ -9,6 +9,8 @@ import List from './components/List'
import Detail from './components/Detail'
import Setting from './components/Setting'
import settingDetail from "./components/settingDetail";
import SetKeywordManagement from './components/SetKeywordManagement'
import SetReportType from './components/SetReportType'
export default {
name: 'AppWorkOrder',
@@ -29,24 +31,42 @@ export default {
},
computed: {
currentPage() {
if(this.$route.query.id) { //列表
console.log(this.$route)
if(this.$route.query.id || this.$route.hash == "#Setting" || this.$route.hash == "#SetKeywordManagement" || this.$route.hash == "#SetReportType") { //列表
this.listIndex = this.$route.query.listIndex
}
let {hash, query: {id}} = this.$route
return hash == "#Setting" ? Setting :
hash == "#sd" ? settingDetail :
!!id ? Detail : List
// return hash == "#Setting" ? Setting :
// hash == "#sd" ? settingDetail :
// !!id ? Detail : List
if(hash == "#sd") {
return settingDetail
}else if(hash == "#Detail") {
return Detail
}else if(hash == "#Setting") {
return Setting
}else if(hash == "#SetKeywordManagement") {
return SetKeywordManagement
}else if(hash == "#SetReportType") {
return SetReportType
}else {
return List
}
}
},
components: {
List,
Detail,
Setting
Setting,
SetKeywordManagement,
SetReportType
},
methods: {
onChange(data) {
this.$router.push({query: data.params, hash: data.type == "Setting" ? "#Setting" : ""})
// this.$router.push({query: data.params, hash: data.type == "Setting" ? "#Setting" : ""})
this.$router.push({query: data.params, hash: data.type == data.type ? data.type : ""})
}
}
}