Commit 0c6cd3c5 by changjin

修改缓存问题

parent 48296060
...@@ -177,6 +177,7 @@ export default { ...@@ -177,6 +177,7 @@ export default {
} else { } else {
this.dateType = 'currentDay' this.dateType = 'currentDay'
} }
this.data.pageList.page = 1
this.getData() this.getData()
}, },
handleSizeChange (val) { handleSizeChange (val) {
...@@ -184,13 +185,9 @@ export default { ...@@ -184,13 +185,9 @@ export default {
this.getData() this.getData()
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.data.page = val this.data.pageList.page = val
this.getData() this.getData()
}, },
reset () {
this.searchForm = {}
this.getData(1)
},
showAlert: function (cont) { showAlert: function (cont) {
this.$alert(cont, '温馨提示', { this.$alert(cont, '温馨提示', {
confirmButtonText: '确定' confirmButtonText: '确定'
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="权限配置"> <el-form-item label="权限配置">
<div class="menuList"> <div class="menuList">
<div class="menu"> <div class="menu" :style="{ height: height1}">
<el-tree <el-tree
:data="menuList" :data="menuList"
show-checkbox show-checkbox
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</el-col> </el-col>
<el-row class="mt30 text-center clear"> <el-row class="mt30 text-center clear">
<el-button type="primary" class="mt20" @click="submit">保存</el-button> <el-button type="primary" class="mt20" @click="submit">保存</el-button>
<el-button class="ml20 mt20" @click="goBack">返回</el-button> <el-button class="ml20 mt20" @click="goBack">取消</el-button>
</el-row> </el-row>
</el-form> </el-form>
</el-row> </el-row>
...@@ -65,6 +65,7 @@ export default { ...@@ -65,6 +65,7 @@ export default {
this.roleId = this.$route.params.id this.roleId = this.$route.params.id
this.projectId = window.sessionStorage.getItem('projectId') this.projectId = window.sessionStorage.getItem('projectId')
this.height = (document.documentElement.clientHeight - 150 ) + 'px' this.height = (document.documentElement.clientHeight - 150 ) + 'px'
this.height1 = (document.documentElement.clientHeight - 330 ) + 'px'
this.getMenuList() this.getMenuList()
if (this.roleId !== '0') { if (this.roleId !== '0') {
this.getData() this.getData()
...@@ -78,13 +79,22 @@ export default { ...@@ -78,13 +79,22 @@ export default {
this.data = res.data.data this.data = res.data.data
let menuIdList = [] let menuIdList = []
this.data.roleMenuResponseList.forEach(item=>{ this.data.roleMenuResponseList.forEach(item=>{
if ((item.name == '接口文档' || item.name == '外部系统管理') && item.isChecked == 'checked') { if (item.childrenList.length === 0) {
menuIdList.push(item.id) if (item.isChecked == 'checked') {
} menuIdList.push(item.id)
if (item.childrenList.length > 0) { }
} else {
item.childrenList.forEach(info=>{ item.childrenList.forEach(info=>{
if (info.isChecked == 'checked') { if (info.childrenList.length === 0) {
menuIdList.push(info.id) if (info.isChecked == 'checked') {
menuIdList.push(info.id)
}
} else {
info.childrenList.forEach(i=>{
if (i.isChecked == 'checked') {
menuIdList.push(i.id)
}
})
} }
}) })
} }
...@@ -166,7 +176,6 @@ export default { ...@@ -166,7 +176,6 @@ export default {
float: left; float: left;
padding: 5px 10px 10px 10px; padding: 5px 10px 10px 10px;
margin-right: 10px; margin-right: 10px;
height: 280px;
overflow: auto; overflow: auto;
} }
div{line-height: 28px!important;} div{line-height: 28px!important;}
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</el-col> </el-col>
<el-row class="mt30 text-center clear"> <el-row class="mt30 text-center clear">
<el-button type="primary" class="mt20" @click="submit()">保存</el-button> <el-button type="primary" class="mt20" @click="submit()">保存</el-button>
<el-button class="ml20 mt20" @click="goBack">返回</el-button> <el-button class="ml20 mt20" @click="goBack">取消</el-button>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
......
...@@ -21,6 +21,8 @@ axios.defaults.baseURL = Vue.prototype.baseURL ...@@ -21,6 +21,8 @@ axios.defaults.baseURL = Vue.prototype.baseURL
axios.defaults.withCredentials = true axios.defaults.withCredentials = true
axios.defaults.timeout = 20000 axios.defaults.timeout = 20000
Vue.config.productionTip = false Vue.config.productionTip = false
axios.defaults.headers.get['Cache-Control'] = 'no-cache'
axios.defaults.headers.get['Pragma'] = 'no-cache'
var alert = require('element-ui').MessageBox.alert var alert = require('element-ui').MessageBox.alert
Vue.use(ElementUI) Vue.use(ElementUI)
......
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 sign in to comment