From 59f0c2faafbbe1d2c70e9dcd2f7f0f666db94bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=AE=8F=E6=9D=B0?= <1943105267@qq.com> Date: Sun, 23 Feb 2025 16:58:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AB=AFweb=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=EF=BC=88=E5=88=A0=E9=99=A4/=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/auditPages/assetsManagement.vue | 136 ++++++++++++++++++++- src/views/auditPages/unitAutonomicFill.vue | 40 +++++- 2 files changed, 170 insertions(+), 6 deletions(-) diff --git a/src/views/auditPages/assetsManagement.vue b/src/views/auditPages/assetsManagement.vue index de8e334..7b98d1c 100644 --- a/src/views/auditPages/assetsManagement.vue +++ b/src/views/auditPages/assetsManagement.vue @@ -14,11 +14,21 @@ /> @@ -162,6 +177,47 @@ :limit.sync="formInline.size" @pagination="getList" /> + + + + + +
将文件拖到此处,或点击上传
+
+ + 仅允许导入xls、xlsx格式文件。 + 下载模板 +
+
+ +
@@ -193,6 +249,22 @@ export default { current: 1, size: 20, }, + // 用户导入参数 + upload: { + // 是否显示弹出层(用户导入) + open: false, + // 弹出层标题(用户导入) + title: "web资产导入", + // 是否禁用上传 + isUploading: false, + // 是否更新已经存在的用户数据 + updateSupport: 0, + // 设置上传的请求头部 + headers: { Authorization: "Bearer " + getToken() }, + // 上传的地址 + // url: process.env.VUE_APP_BASE_API + "/tc/assetCurrent/import" + url: location.origin + "/api/tc/assetCurrent/importData", + }, }; }, created() { @@ -200,6 +272,34 @@ export default { this.getDeptTree(); }, methods: { + /**导出 */ + handleExport() { + this.download( + "/tc/assetCurrent/export", + { + ...this.formInline, + }, + `web资产${new Date().getTime()}.xlsx` + ); + }, + // 导入 + handleImport() { + this.upload.open = true; + }, + /**删除 */ + handleDel(row) { + const userIds = row.id; + this.$modal + .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?') + .then(function () { + return deleteAssetInfo(userIds); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, // 修改table背景色 tableRowClassName({ row, rowIndex }) { if (rowIndex % 2 !== 0) { @@ -262,6 +362,36 @@ export default { this.tableData = res.data.records; }); }, + /** 下载模板操作 */ + importTemplate() { + this.download( + "/tc/assetCurrent/importTemplate", + {}, + `web资产导入模板${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(); + }, }, }; diff --git a/src/views/auditPages/unitAutonomicFill.vue b/src/views/auditPages/unitAutonomicFill.vue index 8e5b54a..d06cad8 100644 --- a/src/views/auditPages/unitAutonomicFill.vue +++ b/src/views/auditPages/unitAutonomicFill.vue @@ -152,10 +152,15 @@ type="warning" size="mini" plain - icon="el-icon-edit-outline" + icon="el-icon-s-check" >审批 - 驳回原因 @@ -171,6 +176,18 @@ :limit.sync="formInline.size" @pagination="getList" /> + + +
+
不通过原因:
+
{{ rejectInfo }}
+
+
@@ -187,6 +204,8 @@ export default { dicts: ["sys_ptlx_type", "tc_tb_state"], data() { return { + openReject: false, + rejectInfo: "", loading: false, tableData: [], tabHeader: 585, @@ -227,10 +246,14 @@ export default { this.getList(); }, methods: { + /**查看驳回原因 */ + handleRejectInfo(row) { + this.rejectInfo = row.auditYy; + this.openReject = true; + }, /** * 类型变化 */ - changeType(index, value) { if (this.currentIndex == index) return; this.currentIndex = index; @@ -322,4 +345,15 @@ export default { border: 0; } } + +.row { + display: flex; + + .row-lable { + width: 15%; + } + .row-value { + width: 90%; + } +}