Skip to content

Commit

Permalink
Merge pull request #197 from WeBankFinTech/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mingzhenliu authored Jun 10, 2020
2 parents fd6b4e0 + 98adc92 commit c47d142
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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.4c22d4d55839a3ce8b74.js></script><script type=text/javascript src=./static/js/3.65b379e26dc7c807b358.js></script><script type=text/javascript src=./static/js/runtime.d6f9ad6760c818fb3c25.js></script><script type=text/javascript src=./static/js/5.39fa7a9735c0620c0fc2.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.2eca60dfc0eea918f0ef.js></script><script type=text/javascript src=./static/js/3.65b379e26dc7c807b358.js></script><script type=text/javascript src=./static/js/runtime.d6f9ad6760c818fb3c25.js></script><script type=text/javascript src=./static/js/5.39fa7a9735c0620c0fc2.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

Large diffs are not rendered by default.

43 changes: 28 additions & 15 deletions src/views/chaincode/dialog/changeUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<td>
<el-select v-model="userName" :placeholder="$t('text.select')" style="width: 240px">
<el-option :label="item.userName" :value="item.address" :key="item.userId" v-for='item in userList'></el-option>
</el-select>
</el-select>
</td>
</tr>
<tr v-if='inputs.length'>
Expand Down Expand Up @@ -62,10 +62,11 @@
<script>
import { sendTransation, getUserList } from "@/util/api";
import errcode from "@/util/errcode";
import { isJson } from "@/util/util"
export default {
name: "changeUser",
props: ["abi"],
data: function() {
data: function () {
return {
userName: "",
userList: [],
Expand All @@ -78,12 +79,12 @@ export default {
errorInfo: ""
};
},
mounted: function() {
mounted: function () {
this.getUserData();
this.changeConstructor();
},
methods: {
changeConstructor: function() {
changeConstructor: function () {
if (this.abifile.length) {
this.abifile.forEach(value => {
if (value.type === "constructor") {
Expand All @@ -92,20 +93,32 @@ export default {
});
}
},
close: function() {
close: function () {
this.$emit("close");
},
submit: function() {
this.versionShow = false;
this.errorInfo = ''
let data = {
userId: this.userName,
params: this.parameter,
};
this.$emit("change", data);
this.$emit("close");
submit: function () {
this.versionShow = false;
this.errorInfo = ''
var params = []
for (let i = 0; i < this.parameter.length; i++) {
if (this.parameter[i] && isJson(this.parameter[i])) {
try {
params[i] = JSON.parse(this.parameter[i])
} catch (error) {
console.log(error)
}
} else {
params[i] = this.parameter[i];
}
}
let data = {
userId: this.userName,
params: params
};
this.$emit("change", data);
this.$emit("close");
},
getUserData: function() {
getUserData: function () {
let reqData = {
groupId: localStorage.getItem("groupId"),
pageNumber: 1,
Expand Down

0 comments on commit c47d142

Please sign in to comment.