sasp-flow-render 1.1.3 → 1.1.6

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.
package/index.js CHANGED
@@ -45,6 +45,12 @@ let components = [
45
45
  ];
46
46
 
47
47
  let createAxiosIfNotExists = (Vue,props) => {
48
+ if((props || {}).axios){
49
+ Vue.prototype.saspFlowAxios = props.axios;
50
+ (props || {}).saspFlowAxios = props.axios;
51
+ return;
52
+ }
53
+
48
54
  let newAxios = axios.create({
49
55
  baseURL:window.FLOW_RENDER_URL,
50
56
  headers: {
@@ -70,13 +76,14 @@ let createAxiosIfNotExists = (Vue,props) => {
70
76
  */
71
77
  let initAxios = (Vue, props) => {
72
78
  let axios = (props || {}).saspFlowAxios;
79
+
73
80
  // 添加请求拦截器
74
81
  axios.interceptors.request.use(function (config) {
75
82
  // if ((config.headers["Content-Type"] != 'multipart/form-data') && isAxiosFormData((config.url))) {
76
83
  if (config.headers["Content-Type"] != 'multipart/form-data') {
77
84
  config = Object.assign({}, config);
78
85
  config.headers = Object.assign({}, config.headers || {}, {
79
- // "Is-Sasp-Qs": true,
86
+ "Is-Sasp-Qs": true,
80
87
  "Content-Type": "application/x-www-form-urlencoded"
81
88
  });
82
89
  }
@@ -94,15 +101,20 @@ let initAxios = (Vue, props) => {
94
101
  });
95
102
  axios.defaults.transformRequest = axios.defaults.transformRequest || [];
96
103
  axios.defaults.transformRequest.push(
97
- function (data) {
98
- if (data && typeof data === "string") { // 本项目的所有请求都通过qs转换实现
99
- try {
100
- data = JSON.parse(data);
101
- } catch (e) {
102
- console.error(e);
104
+ function (data,config) {
105
+ if (config["Is-Sasp-Qs"]) {
106
+ delete config["Is-Sasp-Qs"];
107
+ if (data && typeof data === "string") { // 本项目的所有请求都通过qs转换实现
108
+ try {
109
+ data = JSON.parse(data);
110
+ } catch (e) {
111
+ console.error(e);
112
+ }
103
113
  }
114
+ return qs.stringify(data);
115
+ }else{
116
+ return data;
104
117
  }
105
- return qs.stringify(data);
106
118
  }
107
119
  );
108
120
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sasp-flow-render",
3
- "version": "1.1.3",
3
+ "version": "1.1.6",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -93,6 +93,12 @@ let objResult = {
93
93
  listNoPageByResult:"/flowInstNodeResultController/listNoPageByResult",
94
94
  },
95
95
 
96
+ //流程节点批量处理配置
97
+ plFlowNodeExtend: {
98
+ find: "/plFlowNodeExtendController/find",
99
+ getById: "/plFlowNodeExtendController/getById",
100
+ },
101
+
96
102
  plFlowInst:{
97
103
  url:"/plFlowInstController",
98
104
  queryFormData:"/plFlowInstController/queryFormData",
@@ -146,7 +152,9 @@ let objResult = {
146
152
  changeDealer:"/plFlowInstController/changeDealer", // 切换当前任务处理人
147
153
  forceEnd:"/plFlowInstController/forceEnd", // 强制办结
148
154
  recoverExceptionFlow:"/plFlowInstController/recoverExceptionFlow", // 恢复异常流程
149
- reStartFlow:"/plFlowInstController/reStartFlow" //重启办结状态下的流程
155
+ reStartFlow:"/plFlowInstController/reStartFlow", //重启办结状态下的流程
156
+ batchUpdateFlowStatus:"/plFlowInstController/batchUpdateFlowStatus", //新版流程批量处理的批量修改流程状态
157
+ batchExecuteNextStep:"/plFlowInstController/batchExecuteNextStep", //新版流程批量处理的批量执行下一步
150
158
  },
151
159
 
152
160
  plFlowSetting:{
@@ -183,6 +191,10 @@ let objResult = {
183
191
  login: "/flowLoginController/login",
184
192
  logout: "/flowLoginController/logout",
185
193
  },
194
+ loginInnovateMethod:{
195
+ login: "/loginController/login",
196
+ logout: "/loginController/logout",
197
+ },
186
198
  plFlowDomain:{
187
199
  url:"/plFlowDomainController",
188
200
  find:"/plFlowDomainController/find",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <el-container style="height: 100%;">
3
- <el-header style="height: auto;">
3
+ <el-header style="height: auto;" :class="[{'multiInstListHeader': flowIds.includes(',')}]">
4
4
  <div class="search-form-parent el-card">
5
5
  <el-form :inline="true" :model="crud.searchForm" size="small" class="demo-form-inline"
6
6
  @keyup.enter.native="doSearch()" onSubmit="return false;">
@@ -82,6 +82,9 @@
82
82
  <el-button type="primary" icon="el-icon-document-copy" size="small" round v-if="isShow('pending')"
83
83
  @click="openFlowBatchPendingDialog">批量处理
84
84
  </el-button>
85
+ <el-button type="warning" icon="el-icon-document-copy" size="small" round v-if="isShow('pending') && getFormDataByDataIds"
86
+ @click="openFlowBatchPendingDialogNew">快捷处理
87
+ </el-button>
85
88
  </el-header>
86
89
  <el-main style="height: 100%;padding: 0;" class="main-box">
87
90
  <el-table :data="crud.dataStore.records" :ref="crud.tableRef" @sort-change="flowSortChange"
@@ -140,26 +143,22 @@
140
143
  :key="buttonObj.type" size="small" type="primary"
141
144
  v-if="judgeListButton(tabType,buttonObj.type)"
142
145
  @click="listButtonOpt(buttonObj.type,scope.row)"
143
- :icon="buttonIcon[buttonObj.type]" :type="buttonType[buttonObj.type]">
144
- {{buttonObj.showName}}
146
+ :icon="buttonIcon[buttonObj.type]" :type="buttonType[buttonObj.type]">{{buttonObj.showName}}
145
147
  </el-button>
146
148
  </template>
147
149
  <template v-else>
148
150
  <el-button size="small"
149
151
  @click="listButtonOpt('view',scope.row)"
150
- icon="el-icon-view" type="primary">
151
- 查看
152
+ icon="el-icon-view" type="primary">查看
152
153
  </el-button>
153
154
  <el-button size="small"
154
155
  @click="listButtonOpt('flowRecord',scope.row)"
155
- icon="saspiconfont pl-icon-liuchengtu" type="primary">
156
- 流转记录
156
+ icon="saspiconfont pl-icon-liuchengtu" type="primary">流转记录
157
157
  </el-button>
158
158
  </template>
159
159
  <el-button size="small" v-if="scope.row.linkProcId && scope.row.nodeKey == startNodeKeyObj[scope.row.version]"
160
160
  @click="deleteRowFlow(scope.row)"
161
- icon="el-icon-delete" type="danger">
162
- 删除
161
+ icon="el-icon-delete" type="danger">删除
163
162
  </el-button>
164
163
  </template>
165
164
  </el-table-column>
@@ -297,6 +296,7 @@
297
296
  }
298
297
  },//工作流配置信息
299
298
  formId: {type: String, default: ""},
299
+ flowIds: {type: String, default: ""},
300
300
  startNodeKey: {type: String, default: ""},//开始节点key
301
301
  flowNodeIdToInfo: {
302
302
  type: Object, default: () => {
@@ -358,6 +358,13 @@
358
358
  }
359
359
  },
360
360
 
361
+ // 打开新的批量修改窗口回调函数
362
+ openNewBatchUpdateFlowForm: {
363
+ type: Function, default() {
364
+
365
+ }
366
+ },
367
+
361
368
  // 打开查看窗口回调函数
362
369
  openViewFlowForm: {
363
370
  type: Function, default() {
@@ -389,6 +396,7 @@
389
396
  formImpMethod: {type: Function, default(){}},
390
397
  flowImpParamObj: {type: Object, default: () => ({})},
391
398
  downloadTemplate: {type: Function, default: null},
399
+ getFormDataByDataIds: {type: Function, default: null},
392
400
  },
393
401
  data() {
394
402
 
@@ -500,13 +508,14 @@
500
508
  formSettingVisible: false,
501
509
  flowSortOrder: "",
502
510
  flowAboutFileList: [],
511
+ flowNewBatchDealDataIds: "",
503
512
  }
504
513
  },
505
514
  created() {
506
515
  this.init();
507
516
  this.getListButton();
508
517
  this.initWorkStageTurnOn();
509
- if (this.showModel == "card") {
518
+ if (this.showModel === "card") {
510
519
  this.checkScreenWidth();
511
520
  window.addEventListener('resize', () => { //监听浏览器窗口大小改变
512
521
  //浏览器变化执行动作
@@ -514,8 +523,7 @@
514
523
  });
515
524
  }
516
525
  },
517
- mounted() {
518
- },
526
+ mounted() {},
519
527
  methods: {
520
528
  initWorkStageTurnOn(){
521
529
  this.workTurnOn = WORK_GLOBAL.getTurnOn(this.switchOnline,this.listViewId);
@@ -557,31 +565,42 @@
557
565
  },
558
566
 
559
567
  init() {
560
- this.crud.searchForm["flowId"] = this.flowDefine.id;
568
+ this.crud.searchForm["flowId"] = this.flowIds || this.flowDefine.id;
561
569
  this.$set(this.crud.searchForm,"currentNode","");
562
570
  let flowStatus = this.flowStatusObj[this.tabType];
563
- if(!flowStatus && flowStatus != 0){
571
+ if(!flowStatus && flowStatus !== 0){
564
572
  flowStatus = "";
565
573
  }
566
574
  this.crud.searchForm["nodeType"] = this.tabType;
567
- if (this.tabType == "draft") {
575
+ if (this.tabType === "draft") {
568
576
  this.crud.searchForm["created"] = this.loginUser.id;
569
577
  }
570
- if (this.tabType == "pending" || this.tabType == "processed" || this.tabType == "finished"
571
- || this.tabType == "rescinded" || this.tabType == "discontinue") {
578
+ if (this.tabType === "pending" || this.tabType === "processed" || this.tabType === "finished"
579
+ || this.tabType === "rescinded" || this.tabType === "discontinue") {
572
580
  this.crud.searchForm["dealUserId"] = this.loginUser.id;
573
581
  flowStatus = this.flowStatusObj[this.tabType] || "1";
574
582
  }
575
- if(this.tabType == "flowQuery"){
583
+ if(this.tabType === "flowQuery"){
576
584
  this.crud.searchForm["instQueryPower"] = this.instQueryPower;
577
585
  this.crud.searchForm["created"] = this.loginUser.id;
578
586
  this.crud.searchForm["queryOrderSetting"] = this.flowDefine.queryOrderSetting;
579
587
  }
580
588
  this.$set(this.crud.searchForm, 'flowStatus', flowStatus);
581
589
  this.crud.search();
582
-
583
590
  },
584
591
 
592
+ // initNewBatchDealFunc() {
593
+ // this.initNewBatchDeal().then(() => {
594
+ // this.initFormDataByDataIds();
595
+ // });
596
+ // },
597
+
598
+ // initFormDataByDataIds() {
599
+ // this.getFormDataByDataIds(this.formId, this.flowNewBatchDealDataIds).then(res => {
600
+ // this.$emit('setDataValue', "formDataObj", res);
601
+ // });
602
+ // },
603
+
585
604
  /**
586
605
  * 列表操作按钮显示
587
606
  */
@@ -755,7 +774,7 @@
755
774
  this.crud.searchForm.flowSortOrder = "";
756
775
  }
757
776
  this.$emit("initTabNum");
758
- if (type == "noMessage") {
777
+ if (type === "noMessage") {
759
778
  this.crud.search();
760
779
  } else {
761
780
  this.crud.doSearch();
@@ -831,15 +850,20 @@
831
850
  * 按钮操作事件
832
851
  */
833
852
  listButtonOpt(buttonType, row, type) {
834
- if (buttonType == "update") {//修改
835
- this.openUpdateFlowForm(row,'update');
836
- } else if (buttonType == "deal") {//处理
837
- this.openUpdateFlowForm(row,'handle');
838
- } else if (buttonType == "view") {//查看
853
+ if (buttonType === "update") {
854
+ //修改
855
+ this.openUpdateFlowForm(row, 'update');
856
+ } else if (buttonType === "deal") {
857
+ //处理
858
+ this.openUpdateFlowForm(row, 'handle');
859
+ } else if (buttonType === "view") {
860
+ //查看
839
861
  this.openViewFlowForm(row);
840
- } else if (buttonType == "flowChart") {
862
+ } else if (buttonType === "flowChart") {
863
+ //流程图
841
864
  this.openFlowChart(row);
842
- } else if (buttonType == "flowRecord") {
865
+ } else if (buttonType === "flowRecord") {
866
+ // 流转记录
843
867
  this.openFlowRecord(row);
844
868
  }
845
869
  },
@@ -848,7 +872,7 @@
848
872
  * 打开批量处理页面方法
849
873
  */
850
874
  async openFlowBatchPendingDialog() {
851
- if (this.crud.dataStore.records.length == 0) {
875
+ if (this.crud.dataStore.records.length === 0) {
852
876
  this.$message({
853
877
  showClose: true,
854
878
  message: '当前没有可处理的流程'
@@ -856,7 +880,12 @@
856
880
  } else {
857
881
  this.openBatchUpdateFlowForm(this.crud.dataStore.records);
858
882
  }
859
-
883
+ },
884
+ /**
885
+ * 快捷处理
886
+ */
887
+ openFlowBatchPendingDialogNew(){
888
+ this.openNewBatchUpdateFlowForm();
860
889
  },
861
890
 
862
891
  /**
@@ -1011,6 +1040,9 @@
1011
1040
 
1012
1041
  <style scoped lang="scss">
1013
1042
  @import "css/flowInstList";
1043
+ .multiInstListHeader {
1044
+ margin-top: 10px;
1045
+ }
1014
1046
  </style>
1015
1047
  <style lang="scss">
1016
1048
  .el-tooltip__popper{