Commit b378f824 by wangyalan-git

首页搜索问题

parent 61cd5dda
...@@ -3,7 +3,10 @@ import VueRouter from 'vue-router' ...@@ -3,7 +3,10 @@ import VueRouter from 'vue-router'
import Layout from '@/views/layout/Layout' import Layout from '@/views/layout/Layout'
Vue.use(VueRouter) Vue.use(VueRouter)
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (to) {
return VueRouterPush.call(this, to).catch(err => err)
}
const routes = [ const routes = [
{ {
path: '/login', path: '/login',
......
...@@ -8,7 +8,7 @@ import { getToken } from '@/utils/auth' ...@@ -8,7 +8,7 @@ import { getToken } from '@/utils/auth'
const service = axios.create({ const service = axios.create({
// baseURL: process.env.BASE_API, // baseURL: process.env.BASE_API,
withCredentials: true, withCredentials: true,
baseURL: 'http://192.168.31.116:8401/mall-portal', baseURL: 'http://vankefilemanage.jsonpro.cn/mall-portal',
// baseURL: 'http://hhg.api.jsonpro.cn:8201/mall-admin', // baseURL: 'http://hhg.api.jsonpro.cn:8201/mall-admin',
timeout: 60000 // 请求超时时间 timeout: 60000 // 请求超时时间
}) })
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="100"> width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="100"> width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@click.native.prevent="handleDown(scope.row)" @click.native.prevent="handleDown(scope.row)"
......
...@@ -100,6 +100,7 @@ export default { ...@@ -100,6 +100,7 @@ export default {
// 条件查询 // 条件查询
handleSearchList () { handleSearchList () {
this.listQuery.pageNum = 1 this.listQuery.pageNum = 1
console.log('this.listQuery', typeof (this.listQuery.queryTime))
this.$router.push({ this.$router.push({
path: 'search', path: 'search',
query: { query: {
......
...@@ -90,9 +90,18 @@ export default { ...@@ -90,9 +90,18 @@ export default {
} else { } else {
this.activeIndex = '1' this.activeIndex = '1'
} }
this.getList() this.init()
}, },
methods: { methods: {
init(){
console.log('this.$route.query.name',this.$route.query.name,this.$route.query)
this.listQuery.name = this.$route.query.name
this.listQuery.typeId = this.$route.query.typeId
this.listQuery.adminName = this.$route.query.adminName
this.listQuery.queryTime = this.$route.query.queryTime
this.listQuery.pageNum = 1
this.getList()
},
getFormat (value) { getFormat (value) {
if (!value) { if (!value) {
return '--' return '--'
...@@ -164,13 +173,7 @@ export default { ...@@ -164,13 +173,7 @@ export default {
watch: { watch: {
$route: { $route: {
handler (value) { handler (value) {
console.log('this.$route.query.name',this.$route.query.name,this.$route.query) this.init()
this.listQuery.name = this.$route.query.name
this.listQuery.typeId = this.$route.query.typeId
this.listQuery.adminName = this.$route.query.adminName
this.listQuery.queryTime = this.$route.query.queryTime
this.listQuery.pageNum = 1
this.getList()
}, },
deep: true deep: true
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment