Skip to content

Commit

Permalink
Merge pull request #140 from gongdaxia/dev
Browse files Browse the repository at this point in the history
fix bug
  • Loading branch information
mingzhenliu authored Dec 24, 2019
2 parents 23bbe7d + 9c35506 commit 47b975f
Show file tree
Hide file tree
Showing 17 changed files with 135 additions and 73 deletions.
3 changes: 2 additions & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}</style></head><body><body><div id=app style="height: 100% !important;"></div><script type=text/javascript src=./static/js/0.465a5817238a165bef22.js></script><script type=text/javascript src=./static/js/3.541d9571b914c9a2b006.js></script><script type=text/javascript src=./static/js/runtime.84bc8915eb5048723ed0.js></script><script type=text/javascript src=./static/js/5.19a6f88148f8266d07b4.js></script></body><script src=./static/js/web3.min.js type=text/javascript></script><script>if (self == top) {
}</style></head><body><body><div id=app style="height: 100% !important;"></div><script type=text/javascript src=./static/js/0.e6f6c4eef8f46e99bd0a.js></script><script type=text/javascript src=./static/js/3.0bfe8c760b770e19ca7c.js></script><script type=text/javascript src=./static/js/runtime.3b3ce3a07b1ffbe27563.js></script><script type=text/javascript src=./static/js/5.a3fd349a55a77c83539a.js></script></body><script src=./static/js/web3.min.js type=text/javascript></script><script>if (self == top) {

var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
Expand Down
53 changes: 53 additions & 0 deletions dist/static/js/0.e6f6c4eef8f46e99bd0a.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/static/js/3.0bfe8c760b770e19ca7c.js

Large diffs are not rendered by default.

57 changes: 29 additions & 28 deletions src/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {
systemMonitor: "System Metrics",
nodesMonitor: "Node Metrics",
hostMonitor: "Host Metrics",
emailAlarm: "Email Alert Config",
emailAlarm: "Alarm Config",
emailAlarmType: "Alarm Type Config",
restore: 'Restore',
zoom: 'Zoom',
Expand Down Expand Up @@ -169,7 +169,8 @@ export default {
admin: "Admin",
observerText: "Set as observer node, node will not sealer",
removeText: "Set as remote node, node will not sealer and synchronization",
sealerText: "Set as sealer node, node will sealer.Please contact professional settings"
sealerText: "Set as sealer node, node will sealer.Please contact professional settings",
version: "Version"
},
contracts: {
createFile: "Create File",
Expand All @@ -189,7 +190,7 @@ export default {
contractDeleteFail: "There are deployed contracts in the folder, unable to delete the folder!",
contractSaveTips: "Press Ctrl + s to save the contract content",
contractOpenTips: "Please click on the left panel to open a contract or create a new contract",
sendTransaction: "Call Contract",
sendTransaction: "Call",
changeUser: "Select User",
compileSuccess: "< Compile Successfully!",
conmileNameError: "Contract name and file name should be consistent!",
Expand Down Expand Up @@ -234,11 +235,11 @@ export default {
privateKey: "Private Key",
publicKey: "Public Key",
createUser: "Create User",
userName: "User Name",
userId: "User ID",
description: "User Description",
userName: "Name",
userId: "ID",
description: "Description",
userAddress: "Address",
userStatus: "User Status",
userStatus: "Status",
inputDescription: "Please enter user description",
updateUserSuccess: "User modified successfully",
normal: "Normal",
Expand All @@ -263,10 +264,10 @@ export default {
tableName: "table Name",
userAddress: "Account Address",
userName: "Account Name",
deployAndCreate: "System and table building permission",
cns: "CNS Permission",
sysConfig: "System Configuration Permission",
node: "Node Permissions",
deployAndCreate: "Deploy and Create Table",
cns: "CNS",
sysConfig: "System Configuration",
node: "Node",
confirmPermission: "When adding the first administrator permission, the administrator will start the permission. Please confirm whether the account is correct. Misoperation may cause the service to be unavailable.",
dialogTips: "Tips: public key users cannot authorize other users",
outUserAddress: "Address of external account",
Expand All @@ -277,8 +278,8 @@ export default {
configContent2: "Limited hardware performance such as machine network or CPU: decrease tx_count_limit, or reduce business pressure.",
configContent3: "The business logic is too complicated. When the block is executed, there is not enough gas: increase the tx_gas_limit.",
updateConfig: "Modify Configuration Values",
configKey: "Configuration Name",
configValue: "Configuration Value",
configKey: "Name",
configValue: "Value",
gasLimit: "One transaction maximum gas limit",
countLimit: "The maximum number of transactions that can be packaged in one block",
gasLong: "Range from 100000 to 2147483647",
Expand All @@ -287,7 +288,7 @@ export default {
certName: "Certificate Name",
certType: "Certificate Type",
fingerPrint: "Fingerprint",
father: "Parent Fingerprint",
father: "Parent",
address: "Address",
validityFrom: "Validity Period",
fileSize: "The upload file size cannot exceed 100kb!",
Expand Down Expand Up @@ -318,7 +319,7 @@ export default {
total: "Current Total Quantity",
stroke: "Stroke",
unusualTips: "Too many exceptions (greater than or equal to 20) will stop the audit. It is recommended to check the transaction status, find out the cause of the abnormality and import the contract or user to clean up the abnormal record.",
transactionTime: "Latest Transaction Hours",
transactionTime: "Latest Transaction Time",
hash: "Hash",
inputUser: "Please Enter User",
startTime: "Start Date",
Expand Down Expand Up @@ -350,12 +351,12 @@ export default {
dateLabel: "dd-MM-yyyy",
startTime: "Start Time",
endTime: "End Time",
utilizationRate: "Utilization Rate",
RAM: "RAM",
utilizationRate: " Usage",
RAM: "MEM",
hardDisk: "Hard Disk",
txbps: "Upstream",
rxbps: "Downstream",
bandwidth: "Bandwidth",
txbps: "Uplink",
rxbps: "Downlink",
bandwidth: " Bandwidth",
contrastDateData: "Contrast Daily Data",
noData: "No data collected or data is 0",
showDateData: "Display Date Data",
Expand All @@ -365,8 +366,8 @@ export default {
selectDate: "Please select display date and time"
},
alarm: {
alarmCofig: "Alarm configuration",
emailAlarmConfig: "Email alert configuration",
alarmCofig: "System Metric",
emailAlarmConfig: "Alarm Config",
emailAlarmConfigYips: "System configuration management instructions: The system configuration can configure system property values (currently supports the setting of tx_count_limit and tx_gas_limit properties).",
agreementType: "Protocol",
address: "Address",
Expand All @@ -393,13 +394,13 @@ export default {
sendEmailSuccess: "Mail sent successfully!",
updateEmailAlarmConfigSuccess: "Modifying the alarm mailbox configuration succeeded!",
enterSaveInfo: "Please save the modified configuration information!",
alarmTypeConfig: "Alarm type configuration",
alarmTypeConfig: "Alarm type Config",
enableAlarm: 'Whether to enable the alarm',
alarmCofigList: "Alarm configuration list",
alarmEmailTile: "Alert email title",
emailContent: "Mail template",
sendTime: "Sending interval",
operation: "0peration",
alarmCofigList: "Alarm List",
alarmEmailTile: "Tiltle",
emailContent: "Template",
sendTime: "Interval",
operation: "Action",
update: "Update",
disable: "Disable",
enable: "enable",
Expand Down
3 changes: 2 additions & 1 deletion src/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ export default {
admin: "管理员账号",
observerText: "设置为观察节点,节点将不参与共识",
removeText: "设置为游离节点,节点将不参与共识和同步",
sealerText: "设置为共识节点,节点将参与共识。请联系专业人员设置"
sealerText: "设置为共识节点,节点将参与共识。请联系专业人员设置",
version: "节点版本"
},
contracts: {
createFile: "新建文件",
Expand Down
24 changes: 12 additions & 12 deletions src/views/account/components/accountDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ export default {
accountPwd: sha256(this.accountForm.password),
roleId: this.accountForm.role,
};
if (localStorage.getItem("encryptionId") == 1) {
reqData.accountPwd = "0x" + utils.sha4(this.accountForm.password);
} else {
reqData.accountPwd = sha256(this.accountForm.password);
}
if (this.accountForm.email) {
// if(localStorage.getItem("encryptionId") == 1){
// reqData.accountPwd = "0x" + utils.sha4(this.accountForm.password);
// }else{
// reqData.accountPwd = sha256(this.accountForm.password);
// }
if(this.accountForm.email){
let pattern = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
if (!pattern.test(this.accountForm.email)) {
this.$message({
Expand Down Expand Up @@ -295,12 +295,12 @@ export default {
accountPwd: sha256(this.accountForm.password),
roleId: this.accountForm.role,
};
if (localStorage.getItem("encryptionId") == 1) {
reqData.accountPwd = "0x" + utils.sha4(this.accountForm.password)
} else {
reqData.accountPwd = sha256(this.accountForm.password)
}
if (this.accountForm.email) {
// if(localStorage.getItem("encryptionId") == 1){
// reqData.accountPwd = "0x" + utils.sha4(this.accountForm.password)
// }else{
// reqData.accountPwd = sha256(this.accountForm.password)
// }
if(this.accountForm.email){
let pattern = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
if (!pattern.test(this.accountForm.email)) {
this.$message({
Expand Down
2 changes: 1 addition & 1 deletion src/views/chaincode/components/code.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</div>
</div>
</div>
<el-dialog v-dialogDrag :title="$t('contracts.sendTransaction')" :visible.sync="dialogVisible" width="500px" :before-close="sendClose" v-if="dialogVisible" center class="send-dialog">
<el-dialog v-dialogDrag :title="$t('contracts.sendTransaction')" :visible.sync="dialogVisible" width="580px" :before-close="sendClose" v-if="dialogVisible" center class="send-dialog">
<v-transaction @success="sendSuccess($event)" @close="handleClose" ref="send" :data="data" :abi='abiFile' :version='version' :address='uploadAddress'></v-transaction>
</el-dialog>
<el-dialog v-dialogDrag :title="$t('contracts.changeUser')" :visible.sync="dialogUser" width="500px" v-if="dialogUser" center class="send-dialog">
Expand Down
2 changes: 1 addition & 1 deletion src/views/chaincode/dialog/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default {
}
},
mounted: function () {
this.editorHeight = document.body.offsetHeight * 0.75
this.editorHeight = document.body.offsetHeight * 0.75;
if (this.transationData.output == "0x") {
this.inputButtonShow = false
} else {
Expand Down
14 changes: 7 additions & 7 deletions src/views/chaincode/dialog/sendTransaction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
</div>
<div class="send-item">
<span class="send-item-title">{{this.$t('contracts.contractAddress')}}:</span>
<el-input v-model.trim="contractAddress" style="width: 240px;" :placeholder="$t('contracts.contractAddressInput')"></el-input>
<el-input v-model.trim="contractAddress" style="width: 260px;" :placeholder="$t('contracts.contractAddressInput')"></el-input>
<el-tooltip class="item" effect="dark" :content="$t('contracts.contractAddressInfo')" placement="top-start">
<i class="el-icon-info"></i>
</el-tooltip>
</div>
<div class="send-item" v-show="!constant">
<span class="send-item-title">{{this.$t('contracts.user')}}:</span>
<el-select v-model="transation.userName" :placeholder="$t('contracts.selectUser')" style="width:240px">
<el-select v-model="transation.userName" :placeholder="$t('contracts.selectUser')" style="width:260px">
<el-option :label="item.userName" :value="item.address" :key="item.userId" v-for='(item,index) in userList'>
<span>{{item.userName}}</span>
<span class="font-12">{{splitString(item.address)}}...</span>
Expand All @@ -37,18 +37,18 @@
</div>
<div class="send-item">
<span class="send-item-title">{{this.$t('contracts.method')}}:</span>
<el-select v-model="transation.funcType" :placeholder="$t('contracts.methodType')" @change="changeType($event)" style="width:110px">
<el-select v-model="transation.funcType" :placeholder="$t('contracts.methodType')" @change="changeType($event)" style="width:120px">
<el-option label="function" :value="'function'"></el-option>
</el-select>
<el-select v-model="transation.funcName" :placeholder="$t('contracts.methodName')" filterable v-show="funcList.length > 0" @change="changeFunc" style="width:125px">
<el-select v-model="transation.funcName" :placeholder="$t('contracts.methodName')" filterable v-show="funcList.length > 0" @change="changeFunc" style="width:135px">
<el-option :label="item.name" :key="item.funcId" :value="item.funcId" v-for="item in funcList"></el-option>
</el-select>
</div>
<div class="send-item" v-show="pramasData.length" style="line-height: 25px;">
<span class="send-item-title" style="position: relative;top: 5px;">{{this.$t("contracts.params")}}:</span>
<ul style="position: relative;top: -25px;">
<li v-for="(item,index) in pramasData" style="margin-left:63px;">
<el-input v-model="transation.funcValue[index]" style="width: 240px;" :placeholder="item.type">
<li v-for="(item,index) in pramasData" style="margin-left:120px;">
<el-input v-model="transation.funcValue[index]" style="width: 260px;" :placeholder="item.type">
<template slot="prepend">
<span class="">{{item.name}}</span>
</template>
Expand Down Expand Up @@ -291,7 +291,7 @@ export default {
}
.send-item-title {
display: inline-block;
width: 60px;
width: 116px;
text-align: right;
}
.send-item-params {
Expand Down
2 changes: 1 addition & 1 deletion src/views/chaincode/oldContract.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export default {
sendSuccess: function (val) {
this.dialogVisible = false;
this.editorShow = true;
this.editorData = val;
this.editorData = val.resData;
},
handleSizeChange: function (val) {
this.pageSize = val;
Expand Down
7 changes: 6 additions & 1 deletion src/views/front/front.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
<div class="search-table">
<h3 style="padding: 20px 0 8px 0;">
{{this.$t("nodes.nodeList")}}
<el-tooltip effect="dark" :content="$t('nodes.nodeDescription')" placement="top-start">
<el-tooltip effect="dark" placement="top-start">
<div slot="content">{{$t('nodes.nodeDescription')}}</div>
<i class="el-icon-info contract-icon font-15"></i>
</el-tooltip>
</h3>
Expand Down Expand Up @@ -155,6 +156,10 @@ export default {
enName: "nodeId",
name: this.$t("home.nodeId")
},
{
enName: "clientVersion",
name: this.$t("nodes.version")
},
{
enName: "agency",
name: this.$t("nodes.agency")
Expand Down
16 changes: 8 additions & 8 deletions src/views/index/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="reset-password-title">
{{$t('main.changePassword')}}
</div>
<el-form :model="rulePasswordForm" status-icon :rules="rules2" ref="rulePasswordForm" label-width="140px" class="demo-ruleForm">
<el-form :model="rulePasswordForm" status-icon :rules="rules2" ref="rulePasswordForm" label-width="148px" class="demo-ruleForm">
<el-form-item :label="$t('main.oldPassword')" prop="oldPass">
<el-input type="password" v-model="rulePasswordForm.oldPass" autocomplete="off"></el-input>
</el-form-item>
Expand Down Expand Up @@ -181,17 +181,17 @@ export default {
},
getResetPassword() {
let reqData;
if(localStorage.getItem("encryptionId") == 1){
reqData = {
oldAccountPwd: "0x" + utils.sha4(this.rulePasswordForm.oldPass),
newAccountPwd: "0x" + utils.sha4(this.rulePasswordForm.pass)
};
}else{
// if(localStorage.getItem("encryptionId") == 1){
// reqData = {
// oldAccountPwd: "0x" + utils.sha4(this.rulePasswordForm.oldPass),
// newAccountPwd: "0x" + utils.sha4(this.rulePasswordForm.pass)
// };
// }else{
reqData = {
oldAccountPwd: sha256(this.rulePasswordForm.oldPass),
newAccountPwd: sha256(this.rulePasswordForm.pass)
};
}
// }
resetPassword(reqData, {})
.then(res => {
this.loading = false;
Expand Down
16 changes: 8 additions & 8 deletions src/views/login/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<div class="login-lang">
<lang-select class="right-menu-item hover-effect"></lang-select>
</div>
<div class="login-encrypt">
<!-- <div class="login-encrypt">
<el-radio-group v-model="encryption" @change="handleEncryption" size="mini">
<el-radio-button label="hash">{{$t('login.hash')}}</el-radio-button>
<el-radio-button label="guomi">{{$t('login.guomi')}}</el-radio-button>
</el-radio-group>
</div>
</div> -->
<div class="login">
<div>
<svg class="icon" aria-hidden="true">
Expand Down Expand Up @@ -200,11 +200,11 @@ export default {
account: this.loginForm.user,
accountPwd: sha256(this.loginForm.password)
};
if(localStorage.getItem("encryptionId") == 1){
reqData.accountPwd = "0x" + utils.sha4(this.loginForm.password)
}else{
reqData.accountPwd = sha256(this.loginForm.password)
}
// if(localStorage.getItem("encryptionId") == 1){
// reqData.accountPwd = "0x" + utils.sha4(this.loginForm.password)
// }else{
// reqData.accountPwd = sha256(this.loginForm.password)
// }
let checkCode = this.loginForm.vercode
login(reqData, checkCode, this.authToken)
.then(res => {
Expand All @@ -220,7 +220,7 @@ export default {
router.push("/main")
} else {
this.changeCode()
this.msgErrorContent = errcode.errCode[res.data.code].cn || ""
this.msgErrorContent = this.$chooseLang(res.data.code)
this.msgError = true;
this.loginForm.password = "";
this.logining = false;
Expand Down
Loading

0 comments on commit 47b975f

Please sign in to comment.