diff --git a/src/views/auditPages/assetsManagement/officialAccount.vue b/src/views/auditPages/assetsManagement/officialAccount.vue
index 5127757..414c502 100644
--- a/src/views/auditPages/assetsManagement/officialAccount.vue
+++ b/src/views/auditPages/assetsManagement/officialAccount.vue
@@ -14,11 +14,21 @@
/>
- 导入
- 导出
@@ -131,7 +141,12 @@
icon="el-icon-edit-outline"
>修改
- 删除
@@ -147,6 +162,46 @@
:limit.sync="formInline.size"
@pagination="getList"
/>
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+
+ 仅允许导入xls、xlsx格式文件。
+ 下载模板
+
+
+
+
@@ -204,6 +259,30 @@ export default {
this.getDeptTree();
},
methods: {
+ // 删除
+ handleDel(id) {
+ this.$modal
+ .confirm('是否确认删除用户编号为"' + id + '"的数据项?')
+ .then(function () {
+ return deleteAssetOfficialAccount(id);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("删除成功");
+ })
+ .catch(() => {});
+ },
+
+ // 导出
+ handleExport() {
+ this.download(
+ "/tc/assetOfficialAccount/export",
+ {
+ ...this.formInline,
+ },
+ `公众号资产${new Date().getTime()}.xlsx`
+ );
+ },
// 修改table背景色
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
@@ -265,6 +344,40 @@ export default {
this.tableData = res.data.records;
});
},
+ // 导入
+ handleImport() {
+ this.upload.open = true;
+ },
+ /** 下载模板操作 */
+ importTemplate() {
+ this.download(
+ "/tc/assetOfficialAccount/importTemplate",
+ {},
+ `公众号资产导入模板${new Date().getTime()}.xlsx`
+ );
+ },
+ // 文件上传中处理
+ handleFileUploadProgress(event, file, fileList) {
+ this.upload.isUploading = true;
+ },
+ // 文件上传成功处理
+ handleFileSuccess(response, file, fileList) {
+ this.upload.open = false;
+ this.upload.isUploading = false;
+ this.$refs.upload.clearFiles();
+ this.$alert(
+ "
" +
+ response.msg +
+ "
",
+ "导入结果",
+ { dangerouslyUseHTMLString: true }
+ );
+ this.getList();
+ },
+ // 提交上传文件
+ submitFileForm() {
+ this.$refs.upload.submit();
+ },
},
};