sasp-flow-render 1.0.19 → 1.0.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sasp-flow-render",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -41,6 +41,8 @@
41
41
  <el-button icon="el-icon-close" @click="resetSearch()">清空</el-button>
42
42
  </el-form-item>
43
43
  </el-form>
44
+ <el-button type="primary" style="position: absolute;right:20px;top:20px;z-index:999"
45
+ @click="showFormSetting" v-if="workTurnOn">智能建表配置</el-button>
44
46
  </div>
45
47
  </el-header>
46
48
  <el-main style="height: 100%;padding:0 10px">
@@ -60,7 +62,7 @@
60
62
  </el-button>
61
63
  </el-header>
62
64
  <el-main style="height: 100%;padding: 0;" class="main-box">
63
- <el-table :data="crud.dataStore.records" :ref="crud.tableRef"
65
+ <el-table :data="crud.dataStore.records" :ref="crud.tableRef" @sort-change="flowSortChange"
64
66
  v-if="showModel=='list'" stripe border height="100%" style="width: 100%;">
65
67
  <el-table-column type="selection" width="40" align="center"
66
68
  v-if="isShow('draft')"></el-table-column>
@@ -71,7 +73,8 @@
71
73
  {{userMap[scope.row.startUserId]}}
72
74
  </template>
73
75
  </el-table-column>
74
- <el-table-column :label="tabType=='draft'?'创建时间':'启动时间'" prop="saspStartTime" width="180" align="center"></el-table-column>
76
+ <el-table-column :label="tabType=='draft'?'创建时间':'启动时间'"
77
+ prop="saspStartTime" width="180" align="center"></el-table-column>
75
78
  <el-table-column label="办结时间" prop="finishedTime" width="180" align="center"
76
79
  v-if="isShow('finished')"></el-table-column>
77
80
  <el-table-column label="撤销时间" prop="revokedTime" width="180" align="center"
@@ -246,11 +249,18 @@
246
249
  layout="total, sizes, prev, pager, next, jumper">
247
250
  </el-pagination>
248
251
  </el-footer>
252
+ <!-- 请求前后加载组件end -->
253
+ <el-dialog :title="title" append-to-body
254
+ :close-on-click-modal="false"
255
+ :visible.sync="formSettingVisible" width="99%" height="98%" top="1vh">
256
+ <vue-form-edit :form-id="formId" :define-key="formDefineKey"
257
+ v-if="formSettingVisible" @cancel="formSettingVisible = false;"></vue-form-edit>
258
+ </el-dialog>
249
259
  </el-container>
250
260
  </template>
251
261
 
252
262
  <script>
253
- import {Replace} from "sasp-base";
263
+ import {Replace,WORK_GLOBAL} from "sasp-base";
254
264
  import FlowChart from "../flowChart";
255
265
  import FlowRoamRecord from "../flowRoamRecords";
256
266
 
@@ -459,11 +469,18 @@
459
469
  currentOptColumnWidth: this.optColumnWidth,
460
470
  screenWidth:"",
461
471
  screenHeight:"",
472
+ workTurnOn:false,
473
+ flowFormId: "",
474
+ formDefineKey: "",
475
+ title: "",
476
+ formSettingVisible:false,
477
+ flowSortOrder:""
462
478
  }
463
479
  },
464
480
  created() {
465
481
  this.init();
466
482
  this.getListButton();
483
+ this.initWorkStageTurnOn();
467
484
  if (this.showModel == "card") {
468
485
  this.checkScreenWidth();
469
486
  window.addEventListener('resize', () => { //监听浏览器窗口大小改变
@@ -475,7 +492,34 @@
475
492
  mounted() {
476
493
  },
477
494
  methods: {
478
-
495
+ initWorkStageTurnOn(){
496
+ this.workTurnOn = WORK_GLOBAL.getTurnOn(this.switchOnline,this.listViewId);
497
+ },
498
+ switchOnline(val){
499
+ this.workTurnOn = val;
500
+ },
501
+ /**
502
+ * 打开相关的智能建表
503
+ */
504
+ showFormSetting(){
505
+ this.axios.post(this.api.plPageInfo.find,{ flowId: this.flowDefine.id }).then(res => {
506
+ let pageInfo = (res.data || [])[0] || {};
507
+ this.pageName = pageInfo.pageName || "";
508
+ this.flowFormId = pageInfo.formId;
509
+ this.formDefineKey = pageInfo.formDefineKey;
510
+ this.title = "智能建表配置("+ (this.pageName) +")";
511
+ if (this.SASP_FORM_CONFIG_PACK) {
512
+ this.formSettingVisible = true;
513
+ } else {
514
+ let href = window.FORM_RENDER_URL + "/formPath/index.html#/vueFormEditRedirect" +
515
+ "?formId=" + this.flowFormId + "&defineKey=" + this.formDefineKey + "&title=" + this.title;
516
+ window.open(href,"_blank");
517
+ // let href = window.FORM_RENDER_URL + "/formPath/index.html#/vueFormEditRedirect" +
518
+ // "?flowId=" + this.flowDefine.id + "&type=flow";
519
+ // window.open(href,"_blank");
520
+ }
521
+ });
522
+ },
479
523
  /**
480
524
  * 根据类型加载不需要清楚的
481
525
  */
@@ -676,6 +720,9 @@
676
720
  if (timeArr.length > 0 && timeArr[1]) {
677
721
  this.crud.searchForm.startTimeEnd = timeArr[1] + " 23:59:59";
678
722
  }
723
+ if (this.flowSortOrder) {
724
+ this.crud.searchForm.flowSortOrder = this.flowSortOrder;
725
+ }
679
726
  this.$emit("initTabNum");
680
727
  if (type == "noMessage") {
681
728
  this.crud.search();
@@ -814,6 +861,19 @@
814
861
  })
815
862
  return arr.join(",");
816
863
  },
864
+ //点击列排序是的函数
865
+ flowSortChange({column, prop, order}){
866
+ if(column.order){
867
+ if(column.order == "ascending"){ // asc
868
+ this.flowSortOrder = column.property + " ASC";
869
+ }else{
870
+ this.flowSortOrder = column.property + " DESC";
871
+ }
872
+ }else{
873
+ this.flowSortOrder = "";
874
+ }
875
+ this.doSearch();
876
+ },
817
877
  }
818
878
  }
819
879
  </script>
@@ -1865,13 +1865,15 @@
1865
1865
  background: 'rgba(0, 0, 0, 0.7)'
1866
1866
  })
1867
1867
  let currentInst = this.currentInst;
1868
- this.$confirm('确定要退回至上一个节点吗?', '警告', {
1868
+ this.$prompt('退回备注', '确定要退回至上一个节点吗?', {
1869
1869
  confirmButtonText: '确定',
1870
1870
  cancelButtonText: '取消',
1871
- }).then(() => {
1871
+ inputType: 'textarea',
1872
+ }).then(({ value }) => {
1872
1873
  this.axios.post(this.api.plFlowInst.backRewrite,
1873
1874
  {
1874
- taskId:currentInst.taskId
1875
+ taskId:currentInst.taskId,
1876
+ remarks: value
1875
1877
  }).then(res => {
1876
1878
  if (res && res.data && res.data.operateSuccess) {
1877
1879
  this.$message({type: "success", message: "退回成功!"});
@@ -286,6 +286,7 @@
286
286
  let variables = res.data.resultObject.variables;
287
287
  let userIdsMap = res.data.resultObject.userIdsMap;
288
288
  let externalTak = res.data.resultObject.externalTak;
289
+ let plNodeInstMap = res.data.resultObject.plNodeInstMap;
289
290
  // 初始化多人处理数据
290
291
  let multiInstanceBodyObj = {};
291
292
  let multiInstanceArr = [];
@@ -466,6 +467,7 @@
466
467
  }else if(variables["back_" + item.taskId]){ // 退回
467
468
  item.nodeInstStatus = "3";
468
469
  item.actorUserName += "(由用户‘"+ userIdsMap[variables["back_" + item.taskId]] + "’退回)";
470
+ item.nodeMask = plNodeInstMap[item.taskId] === undefined ? "" : plNodeInstMap[item.taskId].backMsg;
469
471
  }else if(Object.keys(variables).indexOf("autoEnd_" + item.taskId) > -1){ // 自动处理
470
472
  item.actorUserName += "(系统自动处理)";
471
473
  }else if(variables["assignTask_" + item.taskId]){ // 退回
@@ -257,14 +257,14 @@
257
257
  }
258
258
  }else if(affect.valType == 'sysData'){ //数据字典
259
259
  if(affect.value){
260
- let maxIndex = affect.value.length - 1;
260
+ let maxIndex = affect.value.length - 1;
261
261
  paramsObj[field] = affect.value[maxIndex] || '';
262
262
  }
263
- }else if(affect.valType == 'user'){
264
- if(affect.value.indexOf("LOGINUSER") > -1){
263
+ }else if(affect.valType == 'user' && affect.value.indexOf("LOGINUSER") > -1){
264
+ // if(affect.value.indexOf("LOGINUSER") > -1){
265
265
  let value = Replace.def(vm.loginUser,affect.value) || "";
266
266
  paramsObj[field] = value;
267
- }
267
+ // }
268
268
  }
269
269
  }
270
270
  });
@@ -289,11 +289,11 @@
289
289
  let maxIndex = affect.value.length - 1;
290
290
  vm.$set(formData,field,affect.value[maxIndex] || '');
291
291
  }
292
- }else if(affect.valType == 'user'){
293
- if(affect.value.indexOf("LOGINUSER") > -1){
292
+ }else if(affect.valType == 'user' && affect.value.indexOf("LOGINUSER") > -1){
293
+ // if(affect.value.indexOf("LOGINUSER") > -1){
294
294
  let value = Replace.def(vm.loginUser,affect.value) || "";
295
295
  vm.$set(formData,field,value)
296
- }
296
+ // }
297
297
  }
298
298
  }
299
299
  });