From 72bf9657505b959c8a9cb20130d632a251629227 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Cjinzhiwen=E2=80=9D?= <724338817@qq.com>
Date: Thu, 1 Sep 2022 09:14:27 +0800
Subject: [PATCH] addAuthCheck
---
dist/index.html | 2 +-
...25984ee20.js => 0.71ca86169c7270a1ef16.js} | 6 +-
dist/static/js/0.71ca86169c7270a1ef16.js.gz | Bin 0 -> 375614 bytes
dist/static/js/0.b9b352e101525984ee20.js.gz | Bin 375382 -> 0 bytes
dist/static/js/1.6ce09c912b8dd53c56f1.js.gz | Bin 177837 -> 0 bytes
...dd53c56f1.js => 1.6d14811d314a180929cc.js} | 6 +-
dist/static/js/1.6d14811d314a180929cc.js.gz | Bin 0 -> 178207 bytes
...013e58b4a.js => 3.4533f757440952c1b7b7.js} | 2 +-
...b4a.js.gz => 3.4533f757440952c1b7b7.js.gz} | Bin 103701 -> 103701 bytes
...ca24f75a4.js => 7.84258ead1f1965e857c1.js} | 2 +-
...5a4.js.gz => 7.84258ead1f1965e857c1.js.gz} | Bin 15162 -> 15161 bytes
...5945bdfed.js => 8.2b56380d74720982ad6f.js} | 2 +-
...fed.js.gz => 8.2b56380d74720982ad6f.js.gz} | Bin 49431 -> 48792 bytes
...c25.js => runtime.b8a68c6207f07aa2ebb7.js} | 2 +-
src/views/bfs/index.vue | 6 +-
src/views/chaincode/oldContract.vue | 1587 +++++++++--------
src/views/committeeMgmt/index.vue | 84 +-
17 files changed, 866 insertions(+), 833 deletions(-)
rename dist/static/js/{0.b9b352e101525984ee20.js => 0.71ca86169c7270a1ef16.js} (67%)
create mode 100644 dist/static/js/0.71ca86169c7270a1ef16.js.gz
delete mode 100644 dist/static/js/0.b9b352e101525984ee20.js.gz
delete mode 100644 dist/static/js/1.6ce09c912b8dd53c56f1.js.gz
rename dist/static/js/{1.6ce09c912b8dd53c56f1.js => 1.6d14811d314a180929cc.js} (88%)
create mode 100644 dist/static/js/1.6d14811d314a180929cc.js.gz
rename dist/static/js/{3.206d4ed4c8f013e58b4a.js => 3.4533f757440952c1b7b7.js} (99%)
rename dist/static/js/{3.206d4ed4c8f013e58b4a.js.gz => 3.4533f757440952c1b7b7.js.gz} (84%)
rename dist/static/js/{8.b2f65789fb3ca24f75a4.js => 7.84258ead1f1965e857c1.js} (99%)
rename dist/static/js/{8.b2f65789fb3ca24f75a4.js.gz => 7.84258ead1f1965e857c1.js.gz} (98%)
rename dist/static/js/{7.7ff84ff025f5945bdfed.js => 8.2b56380d74720982ad6f.js} (86%)
rename dist/static/js/{7.7ff84ff025f5945bdfed.js.gz => 8.2b56380d74720982ad6f.js.gz} (68%)
rename dist/static/js/{runtime.2f47c3e6323f1337ac25.js => runtime.b8a68c6207f07aa2ebb7.js} (58%)
diff --git a/dist/index.html b/dist/index.html
index 732ef92e..07fa05af 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -21,7 +21,7 @@
height: 100%;
margin: 0px;
padding: 0px;
- }
diff --git a/src/views/committeeMgmt/index.vue b/src/views/committeeMgmt/index.vue
index 2e233b84..ff1ee17b 100644
--- a/src/views/committeeMgmt/index.vue
+++ b/src/views/committeeMgmt/index.vue
@@ -56,8 +56,8 @@
-
-
+
+
(governForm.weight = isnumber(e))" style="width:250px;">
@@ -123,10 +123,10 @@
-
- {{$t('govCommittee.thresholdNow')}}:{{winRateNow}}
- {{$t('govCommittee.participatesRateNow')}}:{{participatesRateNow}}
-
+
+ {{$t('govCommittee.thresholdNow')}}:{{winRateNow}}
+ {{$t('govCommittee.participatesRateNow')}}:{{participatesRateNow}}
+
@@ -213,10 +213,12 @@
-
+
{{$t('govCommittee.Committee')}}
-
+
{{$t('govCommittee.revokeVote')}}
@@ -298,6 +300,7 @@ import {
voteRevoke,
modifyRate,
getCount,
+ getPermissionManagementStatus,
} from "@/util/api";
export default {
name: "committeeMgmt",
@@ -366,8 +369,8 @@ export default {
// width: ''
// }
],
- winRateNow:'',
- participatesRateNow:'',
+ winRateNow: "",
+ participatesRateNow: "",
governForm: {
fromAddress: "",
governorAddress: "",
@@ -453,19 +456,19 @@ export default {
computed: {
rules() {
- let _this=this;
- var paramRule = (rule, value, callback) => {
- let val = value.trim();
- let chainCommittes=[]
- _this.produceCommittee.map((item)=>{
- chainCommittes.push(item.governorAddress)
- })
- if (chainCommittes.includes(val)) {
- callback(new Error(this.$t("rule.chainCommite")));
- } else {
- callback();
- }
- };
+ let _this = this;
+ var paramRule = (rule, value, callback) => {
+ let val = value.trim();
+ let chainCommittes = [];
+ _this.produceCommittee.map((item) => {
+ chainCommittes.push(item.governorAddress);
+ });
+ if (chainCommittes.includes(val)) {
+ callback(new Error(this.$t("rule.chainCommite")));
+ } else {
+ callback();
+ }
+ };
let data = {
fromAddress: [
{
@@ -563,14 +566,24 @@ export default {
}
if (localStorage.getItem("groupId")) {
//this.queryGetThreshold()
- this.queryCommitteeList();
- this.queryVoteRecordList();
- this.getUserData();
- this.queryVoteRecordListCount();
+ this.checkAuth();
}
},
methods: {
+ checkAuth() {
+ getPermissionManagementStatus(localStorage.getItem("groupId"))
+ .then((res) => {
+ if (res.data.data == true) {
+ this.queryCommitteeList();
+ this.queryVoteRecordList();
+ this.getUserData();
+ this.queryVoteRecordListCount();
+ } else {
+ }
+ })
+ .catch((err) => {});
+ },
importPrivateKeySuccess() {
this.queryCommitteeList();
this.queryVoteRecordList();
@@ -587,7 +600,6 @@ export default {
this.queryCommitteeList();
this.queryVoteRecordList();
this.queryVoteRecordListCount();
-
},
initGovernForm() {
// this.governForm.fromAddress = ""
@@ -811,8 +823,8 @@ export default {
});
},
closeModifyThreshold() {
- this.governForm.threshold='';
- this.governForm.participatesRate='';
+ this.governForm.threshold = "";
+ this.governForm.participatesRate = "";
this.initGovernForm();
this.modifyThresholdVisible = false;
},
@@ -926,10 +938,10 @@ export default {
// })
// })
//this.total = res.data.totalCount;
- this.disabled=false
+ this.disabled = false;
} else {
- this.disabled=true
- this.chainCommitteeList=[]
+ this.disabled = true;
+ this.chainCommitteeList = [];
this.$message({
message: this.$chooseLang(res.data.code),
type: "error",
@@ -1033,13 +1045,13 @@ export default {
voteRecord(reqData)
.then((res) => {
if (res.data.code === 0) {
- this.disabled=false
+ this.disabled = false;
this.voteList = res.data.data;
//this.voteTotal = res.data.totalCount;
// this.getNetworkDetails()
} else {
- this.disabled=true
- this.voteList=[]
+ this.disabled = true;
+ this.voteList = [];
this.$message({
message: this.$chooseLang(res.data.code),
type: "error",