From 30701a689b2927d58514feaa5b4bc3906338fe82 Mon Sep 17 00:00:00 2001 From: yanfeiyong <2060201549@qq.com> Date: Mon, 21 Apr 2025 17:25:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/compilation/knowledge/index.vue | 30 ++++++++----- .../components/ProjectDetails/spanmanage.vue | 14 ++---- src/views/components/qiyexinxi/qiyexinxi.vue | 12 ++--- .../components/zhengwuxinxi/zhengwuxinxi.vue | 43 ++++++++---------- src/views/evalute/evalist/index.vue | 4 +- src/views/models/badlist/index.vue | 7 +-- src/views/orientedtwo/content/index.vue | 24 +++++----- src/views/orientedtwo/subdivide/index.vue | 45 ++++++------------- 8 files changed, 75 insertions(+), 104 deletions(-) diff --git a/src/views/compilation/knowledge/index.vue b/src/views/compilation/knowledge/index.vue index 77b3599..28dfda2 100644 --- a/src/views/compilation/knowledge/index.vue +++ b/src/views/compilation/knowledge/index.vue @@ -48,10 +48,10 @@ @@ -105,7 +105,7 @@ - + @@ -261,16 +261,16 @@ export default { { required: true, message: "上传时间不能为空", trigger: "change" } ], fj: [ - { required: true, message: "附件不能为空", trigger: "blur" } + { required: true, message: "附件不能为空", trigger: "blur" } ] }, // 文件类型映射 - fileTypeMap: { - 1: "政策文件", - 2: "研究报告", - 3: "网络信息", - 4: "其他", - }, + // fileTypeMap: { + // 1: "政策文件", + // 2: "研究报告", + // 3: "网络信息", + // 4: "其他", + // }, select: 'http', // 默认协议类型 // 用户导入参数 upload: { @@ -358,7 +358,7 @@ export default { updateId: undefined, updateTime: undefined }; - this.select = 'http'; // 重置协议类型 + this.select = 'https'; // 重置协议类型 this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -389,6 +389,9 @@ export default { const catalogId = row.id; this.form = { ...row }; this.setProtocolType(this.form.wz); // 设置协议类型 + this.$nextTick(() => { + this.handleTypeChange(); // 确保在 DOM 更新后调用 + }); this.open = true; this.title = "修改项目知识库"; }, @@ -417,7 +420,8 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const catalogIds = row.id || this.ids; - this.$modal.confirm('是否确认删除项目知识库编号为"' + catalogIds + '"的数据项?').then(() => { + const getFileName = row.name; // 获取 pjys 字段的内容 + this.$modal.confirm(`是否确认删除"${getFileName}"的数据项?`).then(() => { return deleteXmzsk([catalogIds]); }).then(() => { this.getList(); @@ -468,6 +472,8 @@ export default { // 更新 fj 的校验规则 this.rules.fj[0].required = false; } + // 手动触发表单校验 + this.$refs.form.clearValidate('fj'); }, /**导出 */ diff --git a/src/views/components/ProjectDetails/spanmanage.vue b/src/views/components/ProjectDetails/spanmanage.vue index 6778d3e..84f1af3 100644 --- a/src/views/components/ProjectDetails/spanmanage.vue +++ b/src/views/components/ProjectDetails/spanmanage.vue @@ -1,4 +1,5 @@