cloud-web-corejs 1.0.54-dev.505 → 1.0.54-dev.506

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -705,48 +705,51 @@ wfContentMixin = {
705
705
  });
706
706
  },
707
707
  async rejectWfTask(operateType) {
708
- let that = getTarget(this);
709
- var procInstId = this.wfInfo.procInstId;
710
- var taskId = this.wfInfo.taskId;
711
- var destinations = [];
712
-
713
- await that.$http({
714
- url: this.current_prefix + "/wf/getPreIncomeNodes",
715
- data: {
716
- stringOne: taskId,
717
- },
718
- method: "post",
719
- //contentType: 'application/json;charset=utf-8',
720
- async: false,
721
- isLoading: true,
722
- success: (resultMsg) => {
723
- destinations = (resultMsg.objx || []).reverse();
724
- },
725
- });
708
+ this.handleReminderContent("rejectReminder", async ()=>{
709
+ let that = getTarget(this);
710
+ var procInstId = this.wfInfo.procInstId;
711
+ var taskId = this.wfInfo.taskId;
712
+ var destinations = [];
726
713
 
727
- if (destinations == null) {
728
- return false;
729
- }
730
- if (destinations.length == 0) {
731
- that.$message({
732
- message: this.$t2('无法驳回,没有目标节点', 'components.wf.rejectWarnMsg1'),
733
- type: "error",
734
- duration: 2 * 1000,
714
+ await that.$http({
715
+ url: this.current_prefix + "/wf/getPreIncomeNodes",
716
+ data: {
717
+ stringOne: taskId,
718
+ },
719
+ method: "post",
720
+ //contentType: 'application/json;charset=utf-8',
721
+ async: false,
722
+ isLoading: true,
723
+ success: (resultMsg) => {
724
+ destinations = (resultMsg.objx || []).reverse();
725
+ },
735
726
  });
736
- return false;
737
- }
738
- this.operateType = operateType;
739
- let rejectSubmitModel = null;
740
- if (this.wfInfo.toNextNode === 1) {
741
- rejectSubmitModel = this.wfInfo.toNextNode
742
- } else {
743
- rejectSubmitModel = this.wfInfo.toRejectNode == false ? 2 : null
744
- }
745
- this.rejectForm.rejectSubmitModel = rejectSubmitModel;
746
- this.rejectForm.nodeId = destinations[0].nodeId;
747
- this.rejectForm.opinion = "";
748
- this.rejectNodes = destinations;
749
- this.rejectDialogVisible = true;
727
+
728
+ if (destinations == null) {
729
+ return false;
730
+ }
731
+ if (destinations.length == 0) {
732
+ that.$message({
733
+ message: this.$t2('无法驳回,没有目标节点', 'components.wf.rejectWarnMsg1'),
734
+ type: "error",
735
+ duration: 2 * 1000,
736
+ });
737
+ return false;
738
+ }
739
+ this.operateType = operateType;
740
+ let rejectSubmitModel = null;
741
+ if (this.wfInfo.toNextNode === 1) {
742
+ rejectSubmitModel = this.wfInfo.toNextNode
743
+ } else {
744
+ rejectSubmitModel = this.wfInfo.toRejectNode == false ? 2 : null
745
+ }
746
+ this.rejectForm.rejectSubmitModel = rejectSubmitModel;
747
+ this.rejectForm.nodeId = destinations[0].nodeId;
748
+ this.rejectForm.opinion = "";
749
+ this.rejectNodes = destinations;
750
+ this.rejectDialogVisible = true;
751
+ })
752
+
750
753
  },
751
754
  subRejectForm() {
752
755
  let that = getTarget(this);
@@ -800,35 +803,70 @@ wfContentMixin = {
800
803
  },
801
804
  });
802
805
  },
803
- openAgreeDialog(operateType) {
804
- const done = () => {
805
- this.operateType = operateType;
806
- let that = getTarget(this);
807
- this.agreeForm = {
808
- opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
809
- nodeId: null,
810
- };
811
- this.agreeNodes = [];
812
- that.$http({
813
- url: this.current_prefix + "/wf/getNextOutgoingNodes",
806
+ handleReminderContent(scriptType, callback){
807
+ let that = getTarget(this);
808
+ that.$http({
809
+ url: this.current_prefix + "/wf/getReminderContent",
814
810
  data: {
815
- stringOne: this.wfInfo.taskId,
811
+ scriptType,
812
+ taskId: this.wfInfo.taskId,
813
+ uuid: this.wfInfo.uuid,
816
814
  },
817
815
  method: "post",
818
- async: false,
819
816
  isLoading: true,
817
+ errorMsg: false,
820
818
  success: (res) => {
821
- let nodes = res.objx || [];
822
- /*if (tq == true) {
823
- nodes.reverse();
824
- }*/
825
- if (nodes.length) {
826
- this.agreeForm.nodeId = nodes[0].nodeId;
819
+ if(res.objx){
820
+ that.$baseConfirm(res.objx).then(() => {
821
+ callback && callback();
822
+ });
823
+ }else{
824
+ callback && callback();
827
825
  }
828
- this.agreeNodes = nodes;
829
- this.agreeDialogVisible = true;
830
826
  },
831
- });
827
+ error: (e) => {
828
+ if(e.response.status === 404){
829
+ callback && callback();
830
+ }else{
831
+ that.$errorMsg({
832
+ content: e.message,
833
+ type: 'error',
834
+ });
835
+ }
836
+ },
837
+ });
838
+ },
839
+ openAgreeDialog(operateType) {
840
+ const done = () => {
841
+ this.handleReminderContent("submitReminder", ()=>{
842
+ this.operateType = operateType;
843
+ let that = getTarget(this);
844
+ this.agreeForm = {
845
+ opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
846
+ nodeId: null,
847
+ };
848
+ this.agreeNodes = [];
849
+ that.$http({
850
+ url: this.current_prefix + "/wf/getNextOutgoingNodes",
851
+ data: {
852
+ stringOne: this.wfInfo.taskId,
853
+ },
854
+ method: "post",
855
+ async: false,
856
+ isLoading: true,
857
+ success: (res) => {
858
+ let nodes = res.objx || [];
859
+ /*if (tq == true) {
860
+ nodes.reverse();
861
+ }*/
862
+ if (nodes.length) {
863
+ this.agreeForm.nodeId = nodes[0].nodeId;
864
+ }
865
+ this.agreeNodes = nodes;
866
+ this.agreeDialogVisible = true;
867
+ },
868
+ });
869
+ })
832
870
  }
833
871
  let wfConfig = this.wfConfig;
834
872
  if (wfConfig.onClickAgree) {
@@ -848,25 +886,7 @@ wfContentMixin = {
848
886
  done();
849
887
  }
850
888
  },
851
- getTipMsg() {
852
- let that = getTarget(this);
853
- let wfConfig = this.wfConfig;
854
- let wfActionTipConfig = wfConfig.wfActionTipConfig
855
- let tipMsg = "";
856
- if(wfActionTipConfig){
857
- wfActionTipConfig.forEach((item) => {
858
- if(item.operateType == this.operateType){
859
- tipMsg = item.tipMsg || "";
860
- }
861
- })
862
- }
863
- if (this.formConfig.wfActionTipConfigEnabled) {
864
- tipMsg = this.wfConfig.wfActionTipConfig || "";
865
- } else {
866
- tipMsg = that.$t2('是否同意该操作?', 'components.wf.defaultAgreeTipMsg');
867
- }
868
- return tipMsg;
869
- },
889
+
870
890
  subAgreeHandle() {
871
891
  let that = getTarget(this);
872
892
  let nodeId = null;
@@ -120,6 +120,12 @@
120
120
  @change="changeWfEnabled"
121
121
  ></el-switch>
122
122
  </el-form-item>
123
+ <el-form-item :label="i18nt('默认流程单据类型名称')">
124
+ <el-input
125
+ type="text"
126
+ v-model="designer.vueInstance.reportTemplate.objTypeName"
127
+ ></el-input>
128
+ </el-form-item>
123
129
  <el-form-item>
124
130
  <span slot="label"
125
131
  >流程主题
@@ -174,13 +180,6 @@
174
180
  <i class="el-icon-edit"></i>
175
181
  </a>
176
182
  </el-form-item>
177
-
178
- <el-form-item :label="i18nt('默认流程单据类型名称')">
179
- <el-input
180
- type="text"
181
- v-model="designer.vueInstance.reportTemplate.objTypeName"
182
- ></el-input>
183
- </el-form-item>
184
183
  <el-form-item :label="i18nt('引用流程的表单编码')">
185
184
  <el-input
186
185
  type="text"