每次点搜索也执行查询

dev
truthhun 10 months ago
parent f2b170d770
commit 635622af73

@ -171,11 +171,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
this.$router.resolve({
query: this.search,
}).href
) {
this.listArticle()
} else {

@ -144,11 +144,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
this.$router.resolve({
query: this.search,
}).href
) {
this.listAttachment()
} else {

@ -143,11 +143,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listBanner()
} else {

@ -175,11 +175,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listComment()
} else {

@ -130,11 +130,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listCategory()
} else {

@ -298,11 +298,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listDocument()
} else {

@ -214,11 +214,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listDocument()
} else {

@ -150,11 +150,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.$router.push({
query: this.search,

@ -160,11 +160,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listNavigation()
} else {

@ -155,11 +155,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listReport()
} else {

@ -175,11 +175,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listGroup()
} else {

@ -196,11 +196,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listUser()
} else {

@ -133,11 +133,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listPermission()
} else {

@ -240,11 +240,10 @@ export default {
page: 1,
}
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) === 0
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listPunishment()
} else {

Loading…
Cancel
Save