优化代码
This commit is contained in:
parent
0ca6619a80
commit
b376ab792a
|
@ -62,11 +62,10 @@ export default {
|
||||||
const showingChildren = children.filter(item => {
|
const showingChildren = children.filter(item => {
|
||||||
if (item.hidden) {
|
if (item.hidden) {
|
||||||
return false
|
return false
|
||||||
} else {
|
|
||||||
// Temp set(will be used if only has one showing child)
|
|
||||||
this.onlyOneChild = item
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
// Temp set(will be used if only has one showing child)
|
||||||
|
this.onlyOneChild = item
|
||||||
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
// When there is only one child router, the child router is displayed by default
|
// When there is only one child router, the child router is displayed by default
|
||||||
|
|
|
@ -26,6 +26,7 @@ const sessionCache = {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
return JSON.parse(value)
|
return JSON.parse(value)
|
||||||
}
|
}
|
||||||
|
return null
|
||||||
},
|
},
|
||||||
remove (key) {
|
remove (key) {
|
||||||
sessionStorage.removeItem(key);
|
sessionStorage.removeItem(key);
|
||||||
|
@ -59,6 +60,7 @@ const localCache = {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
return JSON.parse(value)
|
return JSON.parse(value)
|
||||||
}
|
}
|
||||||
|
return null
|
||||||
},
|
},
|
||||||
remove (key) {
|
remove (key) {
|
||||||
localStorage.removeItem(key);
|
localStorage.removeItem(key);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* 判断value字符串是否为空
|
* 判断value字符串是否为空
|
||||||
* @param {string} value
|
* @param {string} value
|
||||||
* @returns {Boolean}
|
* @returns {Boolean}
|
||||||
*/
|
*/
|
||||||
|
@ -11,7 +11,7 @@ export function isEmpty(value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断url是否是http或https
|
* 判断url是否是http或https
|
||||||
* @param {string} url
|
* @param {string} url
|
||||||
* @returns {Boolean}
|
* @returns {Boolean}
|
||||||
*/
|
*/
|
||||||
|
@ -20,7 +20,7 @@ export function isHttp(url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断path是否为外链
|
* 判断path是否为外链
|
||||||
* @param {string} path
|
* @param {string} path
|
||||||
* @returns {Boolean}
|
* @returns {Boolean}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
<el-input v-model="form.configKey" placeholder="请输入参数键名" />
|
<el-input v-model="form.configKey" placeholder="请输入参数键名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="参数键值" prop="configValue">
|
<el-form-item label="参数键值" prop="configValue">
|
||||||
<el-input v-model="form.configValue" placeholder="请输入参数键值" />
|
<el-input v-model="form.configValue" type="textarea" placeholder="请输入参数键值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="系统内置" prop="configType">
|
<el-form-item label="系统内置" prop="configType">
|
||||||
<el-radio-group v-model="form.configType">
|
<el-radio-group v-model="form.configType">
|
||||||
|
|
|
@ -522,8 +522,8 @@ export default {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.title = "修改角色";
|
|
||||||
});
|
});
|
||||||
|
this.title = "修改角色";
|
||||||
},
|
},
|
||||||
/** 选择角色权限范围触发 */
|
/** 选择角色权限范围触发 */
|
||||||
dataScopeSelectChange(value) {
|
dataScopeSelectChange(value) {
|
||||||
|
@ -543,8 +543,8 @@ export default {
|
||||||
this.$refs.dept.setCheckedKeys(res.checkedKeys);
|
this.$refs.dept.setCheckedKeys(res.checkedKeys);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.title = "分配数据权限";
|
|
||||||
});
|
});
|
||||||
|
this.title = "分配数据权限";
|
||||||
},
|
},
|
||||||
/** 分配用户操作 */
|
/** 分配用户操作 */
|
||||||
handleAuthUser: function(row) {
|
handleAuthUser: function(row) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<splitpanes class="default-theme">
|
<splitpanes :horizontal="this.$store.getters.device === 'mobile'" class="default-theme">
|
||||||
<!--部门数据-->
|
<!--部门数据-->
|
||||||
<pane size="16">
|
<pane size="16">
|
||||||
<el-col>
|
<el-col>
|
||||||
|
@ -14,8 +14,8 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</pane>
|
</pane>
|
||||||
<!--用户数据-->
|
<!--用户数据-->
|
||||||
<pane>
|
<pane size="84">
|
||||||
<el-col size="84">
|
<el-col>
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="用户名称" prop="userName">
|
<el-form-item label="用户名称" prop="userName">
|
||||||
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
||||||
|
|
Loading…
Reference in New Issue