diff --git a/src/directives/auth.js b/src/directives/auth.js
index d1314cd..277742a 100644
--- a/src/directives/auth.js
+++ b/src/directives/auth.js
@@ -13,6 +13,6 @@ export default {
return
}
let permissions = tool.data.get("PERMISSIONS");
- if (!permissions.some((v) => v === binding.value)) el.parentNode.removeChild(el);
+ if (!permissions.auth.some((v) => v === binding.value)) el.parentNode.removeChild(el);
}
}
diff --git a/src/directives/auths.js b/src/directives/auths.js
index 3bbb9b6..5fd849f 100644
--- a/src/directives/auths.js
+++ b/src/directives/auths.js
@@ -14,7 +14,7 @@ export default {
}
let permissions = tool.data.get("PERMISSIONS");
let flag = false;
- permissions.map((val) => {
+ permissions.auth.map((val) => {
binding.value.map((v) => {
if (val === v) flag = true;
});
diff --git a/src/store/modules/global.js b/src/store/modules/global.js
index 0359a1a..c8261f0 100644
--- a/src/store/modules/global.js
+++ b/src/store/modules/global.js
@@ -1,4 +1,5 @@
import config from "@/config";
+import tool from "@/utils/tool";
export default {
state: {
@@ -7,7 +8,7 @@ export default {
//布局
layout: config.LAYOUT,
//菜单是否折叠 toggle
- menuIsCollapse: config.MENU_IS_COLLAPSE,
+ menuIsCollapse: tool.data.get('menuIsCollapse') || config.MENU_IS_COLLAPSE,
//多标签栏
layoutTags: config.LAYOUT_TAGS,
//主题
@@ -33,6 +34,7 @@ export default {
},
TOGGLE_menuIsCollapse(state){
state.menuIsCollapse = !state.menuIsCollapse
+ tool.data.set('menuIsCollapse',state.menuIsCollapse);
},
TOGGLE_layoutTags(state){
state.layoutTags = !state.layoutTags
diff --git a/src/utils/permission.js b/src/utils/permission.js
index e9377dc..08ed13a 100644
--- a/src/utils/permission.js
+++ b/src/utils/permission.js
@@ -5,8 +5,8 @@ import tool from '@/utils/tool';
*/
export function permissionAll() {
const allPermissions = "*/*/*"
- let permissions = tool.data.get("PERMISSIONS");
- return permissions.includes(allPermissions);
+ let permissions = tool.data.get("PERMISSIONS")
+ return permissions.auth.includes(allPermissions);
}
/**
@@ -16,20 +16,16 @@ export function permissionAll() {
* @returns {boolean}
*/
export function judementSameArr(news, old) {
- // console.log(news)
- // console.log(old)
let count = 0;
- const leng = news.length;
+ const length = news.length;
for (let i in news) {
for (let j in old) {
if (news[i] === old[j]) {
count++;
- // console.log(news[i])
}
}
}
- // console.log('相同的数量', count)
- return count === leng;
+ return count === length;
}
export function permission(data) {
@@ -37,7 +33,7 @@ export function permission(data) {
if(!permissions){
return false;
}
- let isHave = permissions.includes(data);
+ let isHave = permissions.auth.includes(data);
return isHave;
}
diff --git a/src/utils/tool.js b/src/utils/tool.js
index c585fac..a10cebb 100644
--- a/src/utils/tool.js
+++ b/src/utils/tool.js
@@ -321,4 +321,20 @@ tool.isBinaryFile = function (file) {
});
}
+tool.authPermissions = function (list){
+ let arr = [];
+ if(list && list.length>0){
+ list.forEach(item=>{
+ for(let i in item){
+ if(item[i] && item[i].length>0){
+ item[i].forEach(em=>{
+ arr.push(em.actions)
+ })
+ }
+ }
+ })
+ }
+ return arr
+}
+
export default tool
diff --git a/src/views/login/activate.vue b/src/views/login/activate.vue
index 5a96083..350af6c 100644
--- a/src/views/login/activate.vue
+++ b/src/views/login/activate.vue
@@ -58,7 +58,9 @@ export default {
return false
}
this.$TOOL.data.set("MENU", menu.data.menu)
- this.$TOOL.data.set("PERMISSIONS", menu.data.permissions)
+ const data_auth = this.$TOOL.objCopy(menu.data.permissions);
+ data_auth.auth = this.$TOOL.authPermissions(data_auth.data_permissions);
+ this.$TOOL.data.set("PERMISSIONS", data_auth)
this.$TOOL.data.set("DASHBOARDGRID", menu.data.dashboardGrid)
} else {
this.islogin = false
diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue
index 5876c6d..07b5311 100644
--- a/src/views/login/components/passwordForm.vue
+++ b/src/views/login/components/passwordForm.vue
@@ -86,7 +86,9 @@
return false
}
this.$TOOL.data.set("MENU", menu.data.menu)
- this.$TOOL.data.set("PERMISSIONS", menu.data.permissions)
+ const data_auth = this.$TOOL.objCopy(menu.data.permissions);
+ data_auth.auth = this.$TOOL.authPermissions(data_auth.data_permissions);
+ this.$TOOL.data.set("PERMISSIONS", data_auth)
this.$TOOL.data.set("DASHBOARDGRID", menu.data.dashboardGrid)
} else {
this.islogin = false
diff --git a/src/views/login/components/phoneForm.vue b/src/views/login/components/phoneForm.vue
index 4d116e3..45a8450 100644
--- a/src/views/login/components/phoneForm.vue
+++ b/src/views/login/components/phoneForm.vue
@@ -93,7 +93,9 @@
return false
}
this.$TOOL.data.set("MENU", menu.data.menu)
- this.$TOOL.data.set("PERMISSIONS", menu.data.permissions)
+ const data_auth = this.$TOOL.objCopy(menu.data.permissions);
+ data_auth.auth = this.$TOOL.authPermissions(data_auth.data_permissions);
+ this.$TOOL.data.set("PERMISSIONS", data_auth)
this.$TOOL.data.set("DASHBOARDGRID", menu.data.dashboardGrid)
} else {
this.islogin = false
diff --git a/src/views/order/dataConfirm/index.vue b/src/views/order/dataConfirm/index.vue
new file mode 100644
index 0000000..bc402ca
--- /dev/null
+++ b/src/views/order/dataConfirm/index.vue
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{searchShow?'收起':'更多'}}
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看详情
+ 编辑公司
+ 功能授权
+ 数据授权
+ 用户列表
+ 删除公司
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/order/orderPlan/index.vue b/src/views/order/orderPlan/index.vue
new file mode 100644
index 0000000..d01faa4
--- /dev/null
+++ b/src/views/order/orderPlan/index.vue
@@ -0,0 +1,284 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{searchShow?'收起':'更多'}}
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看详情
+ 编辑公司
+ 功能授权
+ 数据授权
+ 用户列表
+ 删除公司
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/setting/company/index.vue b/src/views/setting/company/index.vue
index 872269b..83ee4bf 100644
--- a/src/views/setting/company/index.vue
+++ b/src/views/setting/company/index.vue
@@ -2,9 +2,9 @@
-
新增公司
+
新增公司
- 下载导入模版
+ 下载导入模版
@@ -34,7 +34,7 @@
-
+
@@ -43,11 +43,19 @@
查看详情
- 编辑公司
- 功能授权
- 数据授权
- 用户列表
- 删除公司
+
+ 编辑公司
+
+
+ 功能授权
+
+ 数据授权
+
+ 用户列表
+
+
+ 删除公司
+