Kaynağa Gözat

Merge branch 'master' of http://1.71.9.215:3000/feiyi/cbjsxt-front-master

shiyanyu 1 ay önce
ebeveyn
işleme
cc6909f599

+ 4 - 0
src/views/costAudit/baseInfo/auditReviewDocManage/index.vue

@@ -423,6 +423,7 @@
                         v-model="scope.row.tableName"
                         clearable
                         placeholder="请输入表名(英文)"
+                        :disabled="isDisabled"
                       ></el-input>
                     </template>
                   </el-table-column>
@@ -432,6 +433,7 @@
                         v-model="scope.row.colName"
                         clearable
                         placeholder="请输入列名(英文)"
+                        :disabled="isDisabled"
                       ></el-input>
                     </template>
                   </el-table-column>
@@ -445,6 +447,7 @@
                         v-model="scope.row.whereName"
                         clearable
                         placeholder="请输入条件名"
+                        :disabled="isDisabled"
                       ></el-input>
                     </template>
                   </el-table-column>
@@ -458,6 +461,7 @@
                         v-model="scope.row.whereValue"
                         clearable
                         placeholder="请输入条件值"
+                        :disabled="isDisabled"
                       ></el-input>
                     </template>
                   </el-table-column>

+ 3 - 1
src/views/costAudit/projectInfo/auditProjectManage/memoManage/index.vue

@@ -359,7 +359,9 @@
       </el-form>
 
       <div v-if="!formDisabled" slot="footer" class="dialog-footer-area">
-        <el-button type="primary" @click="handleSave">确认</el-button>
+        <el-button type="primary" :loading="loading" @click="handleSave">
+          确认
+        </el-button>
         <el-button @click="isEditDialogOpen = false">取消</el-button>
       </div>
     </el-dialog>

+ 16 - 0
src/views/costAudit/projectInfo/auditProjectManage/memoManage/memoManageMixin.js

@@ -100,6 +100,8 @@ export const memoManageMixin = {
       memoList: [],
       formTitle: '',
       formDisabled: false,
+      // 添加loading状态,用于防止重复提交
+      loading: false,
       formRules: {
         projectId: [
           {
@@ -612,8 +614,16 @@ export const memoManageMixin = {
     },
 
     handleSave() {
+      // 如果已经在提交中,阻止重复提交
+      if (this.loading) {
+        return
+      }
+
       this.$refs['ruleForm'].validate((valid) => {
         if (valid) {
+          // 设置loading状态为true,显示遮罩层
+          this.loading = true
+
           let task = this.auditTaskList.find(
             (item) => item.projectId === this.editForm.projectId
           )
@@ -650,6 +660,9 @@ export const memoManageMixin = {
       } catch (error) {
         console.error('添加失败:', error)
         this.$message.error('添加失败')
+      } finally {
+        // 无论成功失败,都要设置loading为false,移除遮罩层
+        this.loading = false
       }
     },
 
@@ -667,6 +680,9 @@ export const memoManageMixin = {
       } catch (error) {
         console.error('更新失败:', error)
         this.$message.error('更新失败')
+      } finally {
+        // 无论成功失败,都要设置loading为false,移除遮罩层
+        this.loading = false
       }
     },