|
@@ -254,6 +254,7 @@ export default {
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
handleQuery() {
|
|
|
|
+ this.resetForm();
|
|
// 默认选中第一个
|
|
// 默认选中第一个
|
|
if (this.accountId) {
|
|
if (this.accountId) {
|
|
this.setAccountId(this.accountId)
|
|
this.setAccountId(this.accountId)
|
|
@@ -262,7 +263,7 @@ export default {
|
|
},
|
|
},
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
resetQuery() {
|
|
- this.resetForm('queryForm')
|
|
|
|
|
|
+ this.resetForm();
|
|
// 默认选中第一个
|
|
// 默认选中第一个
|
|
if (this.accounts.length > 0) {
|
|
if (this.accounts.length > 0) {
|
|
this.setAccountId(this.accounts[0].id)
|
|
this.setAccountId(this.accounts[0].id)
|
|
@@ -302,6 +303,23 @@ export default {
|
|
});
|
|
});
|
|
return menuList;
|
|
return menuList;
|
|
},
|
|
},
|
|
|
|
+ // 重置表单,清空表单数据
|
|
|
|
+ resetForm() {
|
|
|
|
+ // 菜单操作
|
|
|
|
+ this.isActive = -1;
|
|
|
|
+ this.isSubMenuActive = -1;
|
|
|
|
+ this.isSubMenuFlag = -1;
|
|
|
|
+
|
|
|
|
+ // 菜单编辑
|
|
|
|
+ this.showRightFlag = false;
|
|
|
|
+ this.nameMaxLength = 0;
|
|
|
|
+ this.showConfigureContent = 0;
|
|
|
|
+ this.hackResetWxReplySelect = true;
|
|
|
|
+ this.hackResetWxReplySelect = false;
|
|
|
|
+ this.tempObj = {};
|
|
|
|
+ this.tempSelfObj = {};
|
|
|
|
+ this.dialogNewsVisible = false;
|
|
|
|
+ },
|
|
|
|
|
|
// ======================== 菜单操作 ========================
|
|
// ======================== 菜单操作 ========================
|
|
// 一级菜单点击事件
|
|
// 一级菜单点击事件
|
|
@@ -397,7 +415,6 @@ export default {
|
|
this.isSubMenuActive = -1;
|
|
this.isSubMenuActive = -1;
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
},
|
|
},
|
|
- // TODO 切换公众号时,清空;或者清空菜单时,也要清空表单;
|
|
|
|
|
|
|
|
// ======================== 菜单编辑 ========================
|
|
// ======================== 菜单编辑 ========================
|
|
handleSave() {
|
|
handleSave() {
|
|
@@ -423,7 +440,7 @@ export default {
|
|
this.loading = true
|
|
this.loading = true
|
|
return deleteMenu(this.accountId);
|
|
return deleteMenu(this.accountId);
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- this.getList();
|
|
|
|
|
|
+ this.handleQuery();
|
|
this.$modal.msgSuccess("清空成功");
|
|
this.$modal.msgSuccess("清空成功");
|
|
}).catch(() => {}).finally(() => {
|
|
}).catch(() => {}).finally(() => {
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -494,11 +511,6 @@ export default {
|
|
url: article.url,
|
|
url: article.url,
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- // this.tempObj.mediaName = item.name
|
|
|
|
- // this.tempObj.url = item.url
|
|
|
|
- // item.mediaType = this.tempObj.mediaType
|
|
|
|
- // item.content.articles = item.content.articles.slice(0,1)
|
|
|
|
- // this.tempObj.content = item.content
|
|
|
|
},
|
|
},
|
|
deleteMaterial() {
|
|
deleteMaterial() {
|
|
this.$delete(this.tempObj,'articleId')
|
|
this.$delete(this.tempObj,'articleId')
|