diff --git a/dist/index.html b/dist/index.html index 8ce32c35..bfc7c54a 100755 --- a/dist/index.html +++ b/dist/index.html @@ -11,7 +11,7 @@ vertical-align: -0.15em; fill: currentColor; overflow: hidden; - }
+ + diff --git a/src/views/chaincode/components/code.vue b/src/views/chaincode/components/code.vue index ad70c999..660b07f3 100755 --- a/src/views/chaincode/components/code.vue +++ b/src/views/chaincode/components/code.vue @@ -194,17 +194,7 @@ export default { Bus.$off("noData") }, beforeMount() { - var head = document.head; - var script = document.createElement("script"); - if(localStorage.getItem("encryptionId") == 1){ - script.src = "./static/js/soljson-v0.4.25-gm.js"; - }else{ - script.src = "./static/js/soljson-v0.4.25+commit.59dbf8f1.js"; - } - script.setAttribute('id', 'soljson'); - if (!document.getElementById('soljson')) { - head.append(script) - } + }, mounted: function () { if (localStorage.getItem("root") === "admin") { @@ -239,19 +229,19 @@ export default { this.version = data.contractVersion; this.complieAbiTextHeight = false; this.complieBinTextHeight = false; - this.$refs['showAbiText'].style.overflow = 'hidden' - this.$refs['showBinText'].style.overflow = 'hidden' - if (data.contractAbi) { - this.$nextTick(() => { - if (this.$refs['showAbiText'].offsetHeight >= 72) { - this.complieAbiTextHeight = true - } - if (this.$refs['showBinText'].offsetHeight >= 72) { - this.complieBinTextHeight = true - } + // this.$refs['showAbiText'].style.overflow = 'hidden' + // this.$refs['showBinText'].style.overflow = 'hidden' + // if (data.contractAbi) { + // this.$nextTick(() => { + // if (this.$refs['showAbiText'].offsetHeight >= 72) { + // this.complieAbiTextHeight = true + // } + // if (this.$refs['showBinText'].offsetHeight >= 72) { + // this.complieBinTextHeight = true + // } - }) - } + // }) + // } }) Bus.$on("noData", data => { diff --git a/src/views/chaincode/contract.vue b/src/views/chaincode/contract.vue index 2a42211e..e13bcd49 100755 --- a/src/views/chaincode/contract.vue +++ b/src/views/chaincode/contract.vue @@ -31,6 +31,7 @@ import menu from "./components/contractCatalog"; import codes from "./components/code"; import contentHead from "@/components/contentHead"; +import { encryption } from "@/util/api"; export default { name: "contract", components: { @@ -70,8 +71,42 @@ export default { } } }, - mounted: function() {}, + mounted: function() { + this.getEncryption(this.initSolc); + }, methods: { + initSolc() { + var head = document.head; + var script = document.createElement("script"); + if (localStorage.getItem("encryptionId") == 0) { + script.src = "./static/js/soljson-v0.4.25+commit.59dbf8f1.js"; + } else { + script.src = "./static/js/soljson-v0.4.25-gm.js"; + } + script.setAttribute('id', 'soljson'); + if (!document.getElementById('soljson')) { + head.append(script) + } + }, + getEncryption: function (callback) { + encryption().then(res => { + if (res.status == 200) { + localStorage.setItem("encryptionId", res.data.data) + callback(); + } else { + this.$message({ + type: "error", + message: this.$chooseLang(res.data.code) + }); + } + }) + .catch(err => { + this.$message({ + type: "error", + message: this.$t('text.systemError') + }); + }); + }, changGroup: function(){ this.$refs.menu.getContracts() }, diff --git a/src/views/chaincode/dialog/editor.vue b/src/views/chaincode/dialog/editor.vue index f4373a0f..ab7a467c 100644 --- a/src/views/chaincode/dialog/editor.vue +++ b/src/views/chaincode/dialog/editor.vue @@ -75,8 +75,7 @@
transactionIndex: - {{item.transactionIndex}} - {{item.transactionIndex}}null + {{item.transactionIndex}}null {{item.transactionIndex}}
@@ -93,8 +92,7 @@
blockNumber: - {{item.blockNumber}} - {{item.blockNumber}}null + {{item.blockNumber}}null {{item.blockNumber}}
@@ -144,18 +142,6 @@ {{item.logIndexRaw}}null {{item.logIndexRaw}}
-
- transactionIndexRaw: - {{item.transactionIndexRaw}} - {{item.transactionIndexRaw}}null - {{item.transactionIndexRaw}} -
-
- blockNumberRaw: - {{item.blockNumberRaw}} - {{item.blockNumberRaw}}null - {{item.blockNumberRaw}} -
}
@@ -234,7 +220,7 @@ export default { } }); this.funcData = this.typesArray.name; - if (this.typesArray.inputs.length) { + if (this.editorOutput.length) { this.decodeData = web3.eth.abi.decodeParameters(this.editorOutput, this.transationData.output); if (JSON.stringify(this.decodeData) != "{}") { diff --git a/src/views/chaincode/dialog/sendTransaction.vue b/src/views/chaincode/dialog/sendTransaction.vue index 3a3da94f..dbefbd5d 100755 --- a/src/views/chaincode/dialog/sendTransaction.vue +++ b/src/views/chaincode/dialog/sendTransaction.vue @@ -216,6 +216,7 @@ export default { funcParam: this.transation.funcValue, contractAbi: [this.pramasObj], contractId: this.data.contractId, + contractAbi: [this.pramasObj] }; if (this.contractAddress) { data.contractAddress = this.contractAddress @@ -244,7 +245,7 @@ export default { message: this.$t("text.selectSuccess") }); } else { - if (resData.statusOK) { + if (resData.status == '0x0') { this.$message({ type: "success", message: this.$t("text.transactionSuccess") diff --git a/src/views/contractEvent/index.vue b/src/views/contractEvent/index.vue new file mode 100644 index 00000000..d73baa52 --- /dev/null +++ b/src/views/contractEvent/index.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/views/index/main.vue b/src/views/index/main.vue index eab68ffd..93c9b544 100755 --- a/src/views/index/main.vue +++ b/src/views/index/main.vue @@ -250,6 +250,7 @@ export default { type: "error", duration: 2000 }); + router.push("/login"); } }).catch(err => { @@ -258,7 +259,7 @@ export default { type: "error", duration: 2000 }); - this.$message.closeAll() + router.push("/login"); }) }, getEncryption: function(){ diff --git a/src/views/index/sidebar.vue b/src/views/index/sidebar.vue index 6add5be4..82ba0bd3 100755 --- a/src/views/index/sidebar.vue +++ b/src/views/index/sidebar.vue @@ -85,6 +85,9 @@ export default { case 'transactionAudit': item.name = this.$t('title.transactionAudit') break; + case 'subscribeEvent': + item.name = this.$t('title.subscribeEvent') + break; } if (item.children) { item.children.forEach((it) => { @@ -143,6 +146,12 @@ export default { case 'emailAlarmType': it.name = this.$t('title.emailAlarmType') break; + case 'blockEvent': + it.name = this.$t('title.blockEvent') + break; + case 'contractEvent': + it.name = this.$t('title.contractEvent') + break; } }) } diff --git a/src/views/rivateKeyManagement/rivateKeyManagement.vue b/src/views/rivateKeyManagement/rivateKeyManagement.vue index 2946004d..8bfb2a96 100755 --- a/src/views/rivateKeyManagement/rivateKeyManagement.vue +++ b/src/views/rivateKeyManagement/rivateKeyManagement.vue @@ -111,6 +111,10 @@ export default { enName: "address", name: this.$t("privateKey.userAddress") }, + { + enName: 'signUserId', + name: this.$t("privateKey.signUserId") + }, { enName: "userStatus", name: this.$t("privateKey.userStatus")