From 89c00344ccc002d3ac92b6d3f979f5e99cb6357c Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Thu, 26 May 2022 17:59:18 +0800
Subject: [PATCH] 角色权限修改

---
 src/views/examination/examination.vue |   13 +++++++++----
 src/views/activitys/real.vue          |    3 +++
 src/views/system/user.vue             |    3 +++
 src/views/activitys/real_xc.vue       |    3 +++
 src/views/zc/zc.vue                   |   10 ++++++++--
 src/views/activitys/real_px.vue       |    3 +++
 6 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/src/views/activitys/real.vue b/src/views/activitys/real.vue
index 36a7c89..0101928 100644
--- a/src/views/activitys/real.vue
+++ b/src/views/activitys/real.vue
@@ -928,6 +928,9 @@
     },
     onLoad(page, params = {}) {
       params["tasktype"] = "0"; // 治安巡查
+      if (this.userInfo.role_name != "administrator"){
+        params["jurisdiction"] = this.userInfo.workjurisdiction;
+      }
       getList(page.currentPage, page.pageSize, params).then((res) => {
         const data = res.data.data;
         this.page.total = data.total;
diff --git a/src/views/activitys/real_px.vue b/src/views/activitys/real_px.vue
index b703287..e200e75 100644
--- a/src/views/activitys/real_px.vue
+++ b/src/views/activitys/real_px.vue
@@ -954,6 +954,9 @@
     },
     onLoad(page, params = {}) {
       params["tasktype"] = "2"; // 治安防范培训
+      if (this.userInfo.role_name != "administrator"){
+        params["jurisdiction"] = this.userInfo.workjurisdiction;
+      }
       getList(page.currentPage, page.pageSize, params).then((res) => {
         const data = res.data.data;
         this.page.total = data.total;
diff --git a/src/views/activitys/real_xc.vue b/src/views/activitys/real_xc.vue
index ba1d839..8d97d85 100644
--- a/src/views/activitys/real_xc.vue
+++ b/src/views/activitys/real_xc.vue
@@ -928,6 +928,9 @@
     },
     onLoad(page, params = {}) {
       params["tasktype"] = "1"; // 治安义务宣传
+      if (this.userInfo.role_name != "administrator"){
+        params["jurisdiction"] = this.userInfo.workjurisdiction;
+      }
       getList(page.currentPage, page.pageSize, params).then((res) => {
         const data = res.data.data;
         this.page.total = data.total;
diff --git a/src/views/examination/examination.vue b/src/views/examination/examination.vue
index 1694d4b..4eaa638 100644
--- a/src/views/examination/examination.vue
+++ b/src/views/examination/examination.vue
@@ -156,10 +156,12 @@
               display: false,
               width:95,
               prop: "phone",
-            },
-             {
-              label: "辖区",
+            }, {
+              label: "居住地辖区",
               prop: "xqname",
+            },{
+              label: "工作地辖区",
+              prop: "workname",
             },
             {
               label: "角色",
@@ -208,7 +210,7 @@
       };
     },
     computed: {
-      ...mapGetters(["permission"]),
+      ...mapGetters(["permission", "userInfo"]),
       permissionList() {
         return {
           addBtn: this.vaildData(this.permission.zc_add, false),
@@ -366,6 +368,9 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
+        if (this.userInfo.role_name != "administrator"){
+          params["jurisdiction"] = this.userInfo.workjurisdiction;
+        }
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data;
           this.page.total = data.total;
diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 15b7c13..727bdf3 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -1173,6 +1173,9 @@
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}) {
+      if (this.userInfo.role_name != "administrator"){
+        params["jurisdiction"] = this.userInfo.workjurisdiction;
+      }
       this.loading = true;
       getList(
         page.currentPage,
diff --git a/src/views/zc/zc.vue b/src/views/zc/zc.vue
index 210d7a0..e16b3b2 100644
--- a/src/views/zc/zc.vue
+++ b/src/views/zc/zc.vue
@@ -159,8 +159,11 @@
               //   value: "value"
               // },
             }, {
-              label: "辖区",
+              label: "居住地辖区",
               prop: "xqname",
+            },{
+              label: "工作地辖区",
+              prop: "workname",
             },
             {
               label: "角色",
@@ -226,7 +229,7 @@
       };
     },
     computed: {
-      ...mapGetters(["permission"]),
+      ...mapGetters(["permission", "userInfo"]),
       permissionList() {
         return {
           addBtn: this.vaildData(this.permission.zc_add, false),
@@ -384,6 +387,9 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
+        if (this.userInfo.role_name != "administrator"){
+          params["jurisdiction"] = this.userInfo.workjurisdiction;
+        }
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data;
           this.page.total = data.total;

--
Gitblit v1.9.3