Commit 8e5d9185 authored by yyh's avatar yyh

代码结构调整

parent e3450ad3
...@@ -131,9 +131,10 @@ export default class ProofList extends Vue { ...@@ -131,9 +131,10 @@ export default class ProofList extends Vue {
del: () => { this.delProof(this.currentProof.id); }, del: () => { this.delProof(this.currentProof.id); },
copy: () => { this.copyProof(this.currentProof); }, copy: () => { this.copyProof(this.currentProof); },
blockquery: () => { this.goToBROWSER(); }, blockquery: () => { this.goToBROWSER(); },
copyhash: () => {}, copyhash: () => { this.copyHash(this.currentProof) },
del2: () => { this.abandonProof(this.currentProof.id); }, del2: () => { this.abandonProof(this.currentProof.id); },
}; };
this.show = false;
obj[type](); obj[type]();
} }
private async getList() { private async getList() {
...@@ -184,7 +185,6 @@ export default class ProofList extends Vue { ...@@ -184,7 +185,6 @@ export default class ProofList extends Vue {
this.getList(); this.getList();
} }
private delProof(proofId: number) { private delProof(proofId: number) {
this.show = false;
this.$dialog.confirm({ this.$dialog.confirm({
title: '提示', title: '提示',
message: '删除后,信息无法找回,确定要删除吗?', message: '删除后,信息无法找回,确定要删除吗?',
...@@ -204,7 +204,6 @@ export default class ProofList extends Vue { ...@@ -204,7 +204,6 @@ export default class ProofList extends Vue {
}); });
} }
private abandonProof(proofId: number) { private abandonProof(proofId: number) {
this.show = false;
this.$dialog.confirm({ this.$dialog.confirm({
title: '是否确定删除该存证?', title: '是否确定删除该存证?',
message: '已删除的存证,在回收站里', message: '已删除的存证,在回收站里',
...@@ -224,7 +223,6 @@ export default class ProofList extends Vue { ...@@ -224,7 +223,6 @@ export default class ProofList extends Vue {
}); });
} }
private blockChainProof(proof: any) { private blockChainProof(proof: any) {
this.show = false;
this.$dialog.confirm({ this.$dialog.confirm({
title: '同意登记方声明', title: '同意登记方声明',
message: '本登记人承诺上链信息的真实性,并自主完成上链操作,以作永恒记录,如有虚假,本登记人自愿承担因此产生的一切后果。', message: '本登记人承诺上链信息的真实性,并自主完成上链操作,以作永恒记录,如有虚假,本登记人自愿承担因此产生的一切后果。',
...@@ -244,7 +242,6 @@ export default class ProofList extends Vue { ...@@ -244,7 +242,6 @@ export default class ProofList extends Vue {
}); });
} }
private async copyProof(proof: any) { private async copyProof(proof: any) {
this.show = false;
await this.$api.proof.add(proof.name, JSON.parse(proof.detail_information)); await this.$api.proof.add(proof.name, JSON.parse(proof.detail_information));
this.$toast.success('复制成功'); this.$toast.success('复制成功');
this.resetList(); this.resetList();
...@@ -252,13 +249,10 @@ export default class ProofList extends Vue { ...@@ -252,13 +249,10 @@ export default class ProofList extends Vue {
private async reName(proof: any) { private async reName(proof: any) {
this.$toast('重命名成功'); this.$toast('重命名成功');
} }
private onCopyHash() { private copyHash(proof: any) {
this.show = false; this.$copyText(proof.hash);
this.$toast('hash地址复制成功'); this.$toast('hash地址复制成功');
} }
private onErrorCopyHash() {
this.$toast.fail('复制失败');
}
private goToBROWSER() { private goToBROWSER() {
location.href = process.env.VUE_APP_BROWSER; location.href = process.env.VUE_APP_BROWSER;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment