Commit 9f7606b5 authored by zL's avatar zL

fix:部分bug修复

parent 00a35c33
...@@ -27,7 +27,14 @@ export default { ...@@ -27,7 +27,14 @@ export default {
components: { components: {
DialogInput, DialogInput,
}, },
props: ["TemplateID"], props: {
activeId: {
type: Number,
},
TemplateID: {
type: Number,
},
},
data() { data() {
return { return {
isErrorShowing: false, isErrorShowing: false,
...@@ -40,6 +47,7 @@ export default { ...@@ -40,6 +47,7 @@ export default {
}, },
mounted() { mounted() {
this.getFolderList(); this.getFolderList();
this.value = this.activeId;
this.gettemplate(this.TemplateID); this.gettemplate(this.TemplateID);
}, },
methods: { methods: {
......
...@@ -145,6 +145,7 @@ ...@@ -145,6 +145,7 @@
<common-dialog v-if="CopyShow" @closePopup="CopyShow = false" showMask> <common-dialog v-if="CopyShow" @closePopup="CopyShow = false" showMask>
<copy-template <copy-template
:TemplateID="TemplateID" :TemplateID="TemplateID"
:activeId="activeId"
@successCallback="successCallback" @successCallback="successCallback"
@close="CopyShow = false" @close="CopyShow = false"
/> />
...@@ -255,6 +256,7 @@ export default { ...@@ -255,6 +256,7 @@ export default {
// 复制 // 复制
copy(item) { copy(item) {
this.CopyShow = true; this.CopyShow = true;
this.activeId = this.MyCategories[this.checkClassification].id;
this.onMenuBlur(); this.onMenuBlur();
this.TemplateID = item.id; this.TemplateID = item.id;
}, },
...@@ -268,7 +270,7 @@ export default { ...@@ -268,7 +270,7 @@ export default {
}, },
}); });
if (res) { if (res) {
this.checkClassification = 0; // this.checkClassification = 0;
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功!", message: "删除成功!",
...@@ -310,7 +312,7 @@ export default { ...@@ -310,7 +312,7 @@ export default {
}, },
addSuccess(val) { addSuccess(val) {
this.AddTemplatePopups = false; this.AddTemplatePopups = false;
this.checkClassification = 0; // this.checkClassification = 0;
this.getpersonalList(val); this.getpersonalList(val);
}, },
AddTemplate() { AddTemplate() {
...@@ -356,10 +358,10 @@ export default { ...@@ -356,10 +358,10 @@ export default {
this.checkClassification = index; this.checkClassification = index;
this.getpersonalList(item.id); this.getpersonalList(item.id);
}, },
// 个人模板>添加分类回调 // 分类下模板操作成功反馈
successCallback() { successCallback() {
this.ClassificationPopups = false; if (this.ClassificationPopups) this.ClassificationPopups = false;
this.CopyShow = false; if (this.CopyShow) this.CopyShow = false;
this.getFolderList(); this.getFolderList();
}, },
// 添加分类 // 添加分类
...@@ -379,9 +381,8 @@ export default { ...@@ -379,9 +381,8 @@ export default {
}); });
if (res) { if (res) {
this.MyCategories = res.data.results; this.MyCategories = res.data.results;
if (this.TemplateDate.index) return;
this.getpersonalList(this.MyCategories[0].id); this.getpersonalList(this.MyCategories[this.checkClassification].id);
this.checkClassification = 0;
} }
}, },
//个人模板or系统模板切换 1 系统模板 0 个人模板 //个人模板or系统模板切换 1 系统模板 0 个人模板
......
...@@ -143,7 +143,6 @@ export default class ImageForm extends Vue { ...@@ -143,7 +143,6 @@ export default class ImageForm extends Vue {
} }
public fileChange(e: any) { public fileChange(e: any) {
const file: File = e.target.files[0]; const file: File = e.target.files[0];
console.log(file);
if (!file) { if (!file) {
return; return;
......
...@@ -3,7 +3,6 @@ import { Message } from 'element-ui'; ...@@ -3,7 +3,6 @@ import { Message } from 'element-ui';
import { CHAIN_BROWSER_URL } from "@/config/URLS"; import { CHAIN_BROWSER_URL } from "@/config/URLS";
function getChainBrowserUrl(hash: string): string { function getChainBrowserUrl(hash: string): string {
console.log(`${CHAIN_BROWSER_URL}${hash}`);
return `${CHAIN_BROWSER_URL}${hash}`; return `${CHAIN_BROWSER_URL}${hash}`;
} }
......
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