From d981e0f7cd5418a450e3e3148b9a30b82a2e343a Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期二, 16 四月 2024 14:51:38 +0800 Subject: [PATCH] 文件上传组件下载 --- src/views/system/unit/index.vue | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/system/unit/index.vue b/src/views/system/unit/index.vue index dc3bf74..1cf35f6 100644 --- a/src/views/system/unit/index.vue +++ b/src/views/system/unit/index.vue @@ -123,7 +123,7 @@ <el-input v-model="form.unitName" placeholder="璇疯緭鍏ュ崟浣嶅悕绉�" /> </el-form-item> <el-form-item label="鍗曚綅璐﹀彿" prop="unitAdminAccount"> - <el-input v-model="form.unitAdminAccount" placeholder="璇疯緭鍏ュ崟浣嶇鐞嗗憳璐﹀彿" /> + <el-input v-model="form.unitAdminAccount" placeholder="璇疯緭鍏ュ崟浣嶇鐞嗗憳璐﹀彿" :disabled="account" /> </el-form-item> <el-form-item label="鍗曚綅鑱旂郴浜�" prop="unitContact"> <el-input v-model="form.unitContact" placeholder="璇疯緭鍏ュ崟浣嶈仈绯讳汉" /> @@ -150,6 +150,8 @@ name: "Unit", data() { return { + // 璐﹀彿涓嶅彲淇敼 + account: true, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -261,6 +263,8 @@ /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { this.daterangeCreateTime = []; + this.queryParams.start = null; + this.queryParams.end = null; this.resetForm("queryForm"); this.handleQuery(); }, @@ -272,12 +276,14 @@ }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { + this.account = false; this.reset(); this.open = true; this.title = "娣诲姞杩愮淮鍗曚綅"; }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { + this.account = true; this.reset(); const id = row.id || this.ids getUnit(id).then(response => { @@ -318,7 +324,7 @@ }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('system/unit/export', { + this.download('yw-unit/export', { ...this.queryParams }, `unit_${new Date().getTime()}.xlsx`) } -- Gitblit v1.8.0