lyh
2025-06-27 f2ce587e752798a2a454e0f029069b4e82a41bc8
增加提交样式,新增批量处理dnc审签
已修改5个文件
216 ■■■■■ 文件已修改
src/views/flowable/workflow/FlowTodo.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleForm.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/guideCardBatch/GuideCardBatchHandle.vue 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/FlowTodo.vue
@@ -580,6 +580,26 @@
      } else if (categorySet.has('WEEK_MAINTENANCE')) {
        this.$refs.weenMaintenanceBatchApprovalModalRef.handleDetail(this.selectionRows[0])
        this.$refs.weenMaintenanceBatchApprovalModalRef.title = this.selectionRows[0].name
      }else if (categorySet.has('ggApproval')){
        let ids = ''
        for (let a = 0; a < this.selectedRowKeys.length; a++) {
          ids += this.selectedRowKeys[a] + ','
        }
        getAction(this.url.isSameNode + '?taskIds=' + ids).then((res) => {
          if (res.success) {
            let taskDefKey = res.result
            this.selectBachData.taskIds = ids
            this.selectBachData.taskDefKey = taskDefKey
            this.$refs.modalFormDispatchFileBatch.title = '批量处理'
            this.$refs.modalFormDispatchFileBatch.edit(this.selectBachData)
            this.$refs.modalFormDispatchFileBatch.disableSubmit = false
          } else {
            this.$notification.warning({
              message: '消息',
              description: res.message
            })
          }
        })
      }
    },
src/views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue
@@ -139,8 +139,20 @@
          </a-row>
          <div class="table-operator" style="text-align: right;">
            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">取消</a-button>
            <a-button @click="submitForm">提 交</a-button>
            <a-button
              @click="handleQueXiaoTask"
              icon="close"
              :disabled="isSubmitting"
              :class="{'disabled-btn': isSubmitting}"
            >取消</a-button>
            <a-button
              @click="submitForm"
              type="primary"
              :disabled="isSubmitting"
              :loading="isSubmitting"
            >
              提 交
            </a-button>
          </div>
        </a-form-model>
      </div>
@@ -209,7 +221,8 @@
      },
      dictOptions: {},
      superFieldList: [],
      workflowSource: []
      workflowSource: [],
      isSubmitting: false,
    }
  },
  created() {
@@ -243,12 +256,27 @@
        alert('无法加载图片,请稍后再试。')
      }
    },
    handleQueXiaoTask(){
      this.visible = false
      this.routeReload()
    handleQueXiaoTask() {
      // 如果正在提交,阻止取消操作
      if (this.isSubmitting) return;
      this.visible = false;
      this.routeReload();
    },
    submitForm () {
      // 如果正在提交,阻止重复点击
      if (this.isSubmitting) return;
      // 开启全局禁选
      this.isSubmitting = true;
      document.body.classList.add('submitting');
      const that = this;
      // 定义一个恢复状态的函数
      const resetState = () => {
        that.isSubmitting = false;
        document.body.classList.remove('submitting');
      };
      if (!that.assignFileStream.auditType==null || that.assignFileStream.auditType===undefined){
          this.$message.warning('请选择处理类型!')
          return false;
@@ -262,6 +290,10 @@
      }
      // 触发表单验证
      this.form.validateFields((err, values) => {
        if (err) {
          resetState(); // 验证失败,恢复状态
          return;
        }
        if (!err) {
          that.confirmLoading = true;
          let url=this.url.auditGuideCardBatch
@@ -285,9 +317,15 @@
            }else{
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
          })
            .catch((error) => {
              console.error(error);
              that.$message.error('提交失败');
            })
            .finally(() => {
              that.confirmLoading = false;
              resetState(); // 请求结束,恢复状态
            });
        }
      })
    },
@@ -317,6 +355,45 @@
}
</script>
<style scoped>
/* 全局禁选样式 - 作用于整个页面 */
html.submitting,
html.submitting body {
  pointer-events: none !important;
  cursor: wait !important;
}
/* 蒙层效果增强 */
html.submitting::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.5);
  z-index: 9998;
}
/* 加载指示器 - 更明显的视觉反馈 */
html.submitting::after {
  content: '提交中...';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1890ff;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 9999;
}
/* 禁用状态按钮样式 */
.disabled-btn {
  opacity: 0.6;
  cursor: not-allowed !important;
}
.shallow-hr {
  border: 0;
  height: 1px; /* 分界线的高度 */
src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleForm.vue
@@ -146,9 +146,8 @@
              httpAction(url,flowTaskVo,method).then((res)=>{
                if(res.success){
                  that.$message.success(res.message);
                  that.valid = false
                  //刷新表格
                  that.$emit('searchReset')
                  that.visible = false;
                  that.$emit('searchReset');
                }else{
                  that.$message.warning(res.message);
                }
src/views/flowable/workflow/guideCardBatch/GuideCardBatchHandle.vue
@@ -144,8 +144,20 @@
            </a-col>
          </a-row>
          <div class="table-operator" style="text-align: right;">
            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">取消</a-button>
            <a-button @click="submitForm">提 交</a-button>
            <a-button
              @click="handleQueXiaoTask"
              icon="close"
              :disabled="isSubmitting"
              :class="{'disabled-btn': isSubmitting}"
            >取消</a-button>
            <a-button
              @click="submitForm"
              type="primary"
              :disabled="isSubmitting"
              :loading="isSubmitting"
            >
              提 交
            </a-button>
          </div>
        </a-form-model>
      </div>
@@ -214,7 +226,8 @@
      },
      dictOptions: {},
      superFieldList: [],
      workflowSource: []
      workflowSource: [],
      isSubmitting: false,
    }
  },
  created() {
@@ -248,12 +261,27 @@
        alert('无法加载图片,请稍后再试。')
      }
    },
    handleQueXiaoTask(){
      this.visible = false
      this.routeReload()
    handleQueXiaoTask() {
      // 如果正在提交,阻止取消操作
      if (this.isSubmitting) return;
      this.visible = false;
      this.routeReload();
    },
    submitForm () {
      // 如果正在提交,阻止重复点击
      if (this.isSubmitting) return;
      // 开启全局禁选
      this.isSubmitting = true;
      document.body.classList.add('submitting');
      const that = this;
      // 定义一个恢复状态的函数
      const resetState = () => {
        that.isSubmitting = false;
        document.body.classList.remove('submitting');
      };
      if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){
          this.$message.warning('请选择处理类型!')
          return false;
@@ -267,6 +295,10 @@
      }
      // 触发表单验证
      this.form.validateFields((err, values) => {
        if (err) {
          resetState(); // 验证失败,恢复状态
          return;
        }
        if (!err) {
          that.confirmLoading = true;
          let url=this.url.auditGuideCardBatch
@@ -301,9 +333,15 @@
            }else{
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
          })
            .catch((error) => {
              console.error(error);
              that.$message.error('提交失败');
            })
            .finally(() => {
              that.confirmLoading = false;
              resetState(); // 请求结束,恢复状态
            });
        }
      })
    },
@@ -333,6 +371,44 @@
}
</script>
<style scoped>
/* 全局禁选样式 - 作用于整个页面 */
html.submitting,
html.submitting body {
  pointer-events: none !important;
  cursor: wait !important;
}
/* 蒙层效果增强 */
html.submitting::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.5);
  z-index: 9998;
}
/* 加载指示器 - 更明显的视觉反馈 */
html.submitting::after {
  content: '提交中...';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1890ff;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 9999;
}
/* 禁用状态按钮样式 */
.disabled-btn {
  opacity: 0.6;
  cursor: not-allowed !important;
}
.shallow-hr {
  border: 0;
  height: 1px; /* 分界线的高度 */
src/views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue
@@ -354,8 +354,10 @@
      }
    },
    handleQueXiaoTask() {
      this.visible = false
      this.routeReload()
      // 如果正在提交,阻止取消操作
      if (this.isSubmitting) return;
      this.visible = false;
      this.routeReload();
    },
    submitForm() {
      // 如果正在提交,阻止重复点击