diff --git a/src/components/scFilterBar/index.vue b/src/components/scFilterBar/index.vue
index 8ca30ce..8d1c1d2 100644
--- a/src/components/scFilterBar/index.vue
+++ b/src/components/scFilterBar/index.vue
@@ -110,7 +110,7 @@
filterObj(){
const obj = {}
this.filter.forEach((item) => {
- if (this.data[item.name] === undefined || this.data[item.name] === null || JSON.stringify(this.data[item.name]) === '') {
+ if (this.data[item.name] === undefined || this.data[item.name] === '' || JSON.stringify(this.data[item.name]) === '') {
return ; // 跳过当前迭代,继续下一次迭代
}
if (item.options && item.options.items && item.options.items.length>0) {
diff --git a/src/router/index.js b/src/router/index.js
index 24a0c28..d6136e7 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -9,6 +9,7 @@ import config from "@/config"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import tool from '@/utils/tool';
+import store from '@/store'
import api from '@/api'
import systemRouter from './systemRouter';
import userRoutes from '@/config/route';
@@ -67,24 +68,27 @@ router.beforeEach(async (to, from, next) => {
if (!isGetRouter) {
// 重新获取菜单路
api.system.index.get().then((response) => {
-
- for (const key in response.data) {
- if (Object.prototype.hasOwnProperty.call(response.data, key)) {
+ if (response.code==200) {
+ // 缓存
+ for (const key in response.data) {
tool.data.set(key, response.data[key]);
+ if (key=='layout') {
+ store.commit("SET_layout", response.data[key])
+ }
}
+ var menu = router.sc_getMenu();
+ var menuRouter = filterAsyncRouter(menu)
+ menuRouter = flatAsyncRoutes(menuRouter)
+ menuRouter.forEach(item => {
+ router.addRoute("layout", item)
+ })
+ routes_404_r = router.addRoute(routes_404)
+ if (to.matched.length == 0) {
+ router.push(to.fullPath);
+ }
+ isGetRouter = true;
}
- var menu = router.sc_getMenu();
- var menuRouter = filterAsyncRouter(menu)
- menuRouter = flatAsyncRoutes(menuRouter)
- menuRouter.forEach(item => {
- router.addRoute("layout", item)
- })
- routes_404_r = router.addRoute(routes_404)
- if (to.matched.length == 0) {
- router.push(to.fullPath);
- }
- isGetRouter = true;
}).catch((error) => {
console.log(error);
});
diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue
index e4c52f9..3470bc1 100644
--- a/src/views/login/components/passwordForm.vue
+++ b/src/views/login/components/passwordForm.vue
@@ -62,6 +62,7 @@
account: this.form.account,
password: this.$tool.crypto.BASE64.encrypt( this.$tool.crypto.BASE64.encrypt( this.form.password ) + this.$tool.crypto.BASE64.encrypt( this.form.account ) )
}
+
//获取token
var user = await this.$api.auth.token.post(data)
if(user.code !== 200){
@@ -75,40 +76,42 @@
})
//获取菜单
- var menu = null
- menu = await this.$api.system.index.get()
+ // var menu = null
+ // menu = await this.$api.system.index.get()
- if(menu.code == 200){
- if(menu.data.menu.length==0){
- this.islogin = false
- this.$alert("当前用户无任何菜单权限,请联系系统管理员", "无权限访问", {
- type: 'error',
- center: true
- })
- return false
- }
+ // if(menu.code == 200){
- for (const key in menu.data) {
- if (Object.prototype.hasOwnProperty.call(menu.data, key)) {
- this.$tool.data.set(key, menu.data[key]);
- }
- }
+ // if(menu.data.menu.length==0){
+ // this.islogin = false
+ // this.$alert("当前用户无任何菜单权限,请联系系统管理员", "无权限访问", {
+ // type: 'error',
+ // center: true
+ // })
+ // return false
+ // }
- }else{
+ // for (const key in menu.data) {
+ // if (Object.prototype.hasOwnProperty.call(menu.data, key)) {
+ // this.$tool.data.set(key, menu.data[key]);
+ // }
+ // }
+ //
+ //
+
+ // 获取登录前的URL
+ const redirect = this.$route.query.redirect || '/'
+ this.$router.replace({
+ path: redirect
+ })
+
+ this.$message.success("Login Success 登录成功")
this.islogin = false
- this.$message.warning(menu.message)
return false
- }
-
- // 获取登录前的URL
- const redirect = this.$route.query.redirect || '/'
- this.$router.replace({
- path: redirect
- })
-
- this.$message.success("Login Success 登录成功")
- this.islogin = false
+ // }
+ // this.islogin = false
+ // this.$message.warning(menu.message)
+ // return false
},
}
}
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index aa833d3..ab3f9c4 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -148,43 +148,38 @@
expires: 86400*360
})
- //获取菜单
- var menu = null
- menu = await this.$api.system.index.get()
+ // //获取菜单
+ // var menu = null
+ // menu = await this.$api.system.index.get()
- if(menu.code == 200){
- if(menu.data.menu.length==0){
- this.islogin = false
- this.$alert("当前用户无任何菜单权限,请联系系统管理员", "无权限访问", {
- type: 'error',
- center: true
- })
- return false
- }
+ // if(menu.code == 200){
+ // if(menu.data.menu.length==0){
+ // this.islogin = false
+ // this.$alert("当前用户无任何菜单权限,请联系系统管理员", "无权限访问", {
+ // type: 'error',
+ // center: true
+ // })
+ // return false
+ // }
+ // for (const key in menu.data) {
+ // if (Object.prototype.hasOwnProperty.call(menu.data, key)) {
+ // this.$tool.data.set(key, menu.data[key]);
+ // }
+ // }
- for (const key in menu.data) {
- if (Object.prototype.hasOwnProperty.call(menu.data, key)) {
- this.$tool.data.set(key, menu.data[key]);
- }
- }
+ // 获取登录前的URL
+ const redirect = this.$route.query.redirect || '/'
+ this.$router.replace({
+ path: redirect
+ })
-
- }else{
+ this.$message.success("Login Success 登录成功")
this.islogin = false
- this.$message.warning(menu.message)
- return false
- }
-
- // 获取登录前的URL
- const redirect = this.$route.query.redirect || '/'
- this.$router.replace({
- path: redirect
- })
-
- this.$message.success("Login Success 登录成功")
- this.islogin = false
-
+ return false
+ // }
+ // this.islogin = false
+ // this.$message.warning(menu.message)
}
},1000)
diff --git a/src/views/system/table/index.vue b/src/views/system/table/index.vue
index c5d2893..4c28d3e 100644
--- a/src/views/system/table/index.vue
+++ b/src/views/system/table/index.vue
@@ -9,46 +9,46 @@
-
-
-
-
-
-
-
- {{ s.label }}
-
-
-
-
+
+
+
+
+
+
+
+ {{ s.label }}
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
- {{ operation.edit.label || '编辑' }}
-
-
- {{ operation.delete.label || '删除' }}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ operation.edit.label || '编辑' }}
+
+
+ {{ operation.delete.label || '删除' }}
+
+
+
+
+
+
+
+
+
@@ -59,9 +59,6 @@
import scFilterBar from '@/components/scFilterBar';
import scEcharts from '@/components/scEcharts'
import XItem from '@/components/scForm/item'
-
-
-
export default {
name: 'propertyAuth',
components: {
@@ -139,9 +136,7 @@
},
//树点击事件
groupClick(data){
-
this.search[this.aside.searchkey||'groupid'] = data[this.aside.key || 'id'];
-
this.$refs.table.reload(this.search)
},
// 筛选回调
@@ -153,10 +148,6 @@
tabChange(){
this.$refs.table.reload(this.search)
},
- //搜索
- upsearch(){
- this.$refs.table.reload(this.search)
- },
//增加
plus(){
this.dialog.save = true
@@ -253,7 +244,6 @@
//本地更新数据
handleSuccess(data, mode){
-
if (!this.operation.edit.url) {
this.$alert('没有编辑相关配置', "提示", {type: 'error'});
return;
@@ -290,6 +280,5 @@
}
}
-
diff --git a/src/views/system/tablegen/column.vue b/src/views/system/tablegen/column.vue
index d03b73b..2bbbb54 100644
--- a/src/views/system/tablegen/column.vue
+++ b/src/views/system/tablegen/column.vue
@@ -173,6 +173,69 @@
+
+
+
+
+
+
+
+
+
+
+
+ Input
+ 下拉
+ 开关
+ 日期选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 小于
+ 小于等于
+ 大于
+ 大于等于
+ 不等于
+ 等于
+ 不包含
+ 包含
+ 模糊查询
+ 区间查询
+
+
+
+
+
+
+ 选项
+
+
+
+
+
+
+
@@ -241,22 +304,6 @@
-
-
-
- 小于
- 小于等于
- 大于
- 大于等于
- 不等于
- 等于
- 不包含
- 包含
- 模糊查询
- 区间查询
-
-
-
@@ -273,17 +320,20 @@
取消
-
-
+
+