Commit fc27b493 by 温丽香

登录过期跳转到登录页

1 parent 6afe77a7
Pipeline #4725 passed
in 2 minutes 11 seconds
......@@ -62,6 +62,9 @@ Axios.interceptors.response.use(res => {
if (res && res.data && res.data.code !== 0) {
notificationError('提示', res.data.msg)
}
if (res && res.data && res.data.code === 22 && res.data.msg === 'user do not login') {
Router.push('/login')
}
return res
}, error => {
error.response && error.response.data && notificationError('提示', error.response.data.message)
......
......@@ -8,7 +8,7 @@
<st-button type="primary" id="btn" @click="showDialog = true">
<i class="iconfont icon-tianjia"></i><span class="text">{{'创建数据表'}}</span></st-button>
<div class="search">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="inputVal">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="inputVal" @input="getData">
<i class="el-input__icon el-icon-search"></i>
</div>
</div>
......@@ -129,7 +129,7 @@ export default {
methods: {
async getData() {
this.loadingStatus = true
const res = await getTable({ pages: this.currentPage - 1, pagesize: this.currentSize })
const res = await getTable({ pages: this.currentPage - 1, pagesize: this.currentSize, name: this.inputVal })
if (res && res.data && res.data.code === 0) {
this.tokenList = res.data.data.tables.map((item, index) => {
item.order = index + 1 + (this.currentPage - 1) * this.currentSize
......
......@@ -9,7 +9,7 @@
<st-button type="primary" @click="$router.push({ path: '/params/add', query: { level: 1 } })">
<i class="iconfont icon-tianjia"></i><span class="text">{{'添加'}}</span></st-button>
<div class="search">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="oneVal">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="oneVal" @input="getOneData">
<i class="el-input__icon el-icon-search"></i>
</div>
</div>
......@@ -46,7 +46,7 @@
<st-button type="primary" @click="$router.push({ path: '/params/add', query: { level: 2 } })">
<i class="iconfont icon-tianjia"></i><span class="text">{{'添加'}}</span></st-button>
<div class="search">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="twoVal">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="twoVal" @input="getTwoData">
<i class="el-input__icon el-icon-search"></i>
</div>
</div>
......@@ -130,7 +130,7 @@ export default {
methods: {
async getOneData() {
this.loadingOne = true
const oneLevel = await getParameter({ base: 1, pages: this.oneCurrentPage - 1, pagesize: 10 })
const oneLevel = await getParameter({ base: 1, pages: this.oneCurrentPage - 1, pagesize: 10, name: this.oneVal })
if (oneLevel && oneLevel.data && oneLevel.data.code === 0) {
this.oneList = oneLevel.data.parameters.datas.map((item, index) => {
item.order = index + 1 + (this.oneCurrentPage - 1) * 10
......@@ -142,7 +142,7 @@ export default {
},
async getTwoData() {
this.loadingTwo = true
const twoLevel = await getParameter({ parent: this.parentLevel === '' ? 0 : this.parentLevel, pages: this.twoCurrentPage - 1, pagesize: 10 })
const twoLevel = await getParameter({ parent: this.parentLevel === '' ? 0 : this.parentLevel, pages: this.twoCurrentPage - 1, pagesize: 10, name: this.twoVal })
if (twoLevel && twoLevel.data && twoLevel.data.code === 0) {
this.twoList = twoLevel.data.parameters.datas.map((item, index) => {
item.order = index + 1 + (this.twoCurrentPage - 1) * 10
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!