sasp-flow-render 1.0.18 → 1.0.20

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.18",
3
+ "version": "1.0.20",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -109,6 +109,7 @@ let objResult = {
109
109
  getAllFlowInst:"/plFlowInstController/getAllFlowInst", // 获取所有流程实例
110
110
  suspendOrRecover:"/plFlowInstController/suspendOrRecover", // 挂起或恢复选中流程实例
111
111
  getListInfoByResource:"/plFlowInstController/getListInfoByResource", // 根据资源id获取列表视图数据
112
+ getPageInfoByFlowId:"/plFlowInstController/getPageInfoByFlowId", // 根据资源id获取页面配置数据
112
113
  findInstPending:"/plFlowInstController/findInstPending",
113
114
  findInstProcessed:"/plFlowInstController/findInstProcessed",
114
115
  findInstFinished:"/plFlowInstController/findInstFinished",
@@ -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">
@@ -246,11 +248,18 @@
246
248
  layout="total, sizes, prev, pager, next, jumper">
247
249
  </el-pagination>
248
250
  </el-footer>
251
+ <!-- 请求前后加载组件end -->
252
+ <el-dialog :title="title" append-to-body
253
+ :close-on-click-modal="false"
254
+ :visible.sync="formSettingVisible" width="99%" height="98%" top="1vh">
255
+ <vue-form-edit :form-id="formId" :define-key="formDefineKey"
256
+ v-if="formSettingVisible" @cancel="formSettingVisible = false;"></vue-form-edit>
257
+ </el-dialog>
249
258
  </el-container>
250
259
  </template>
251
260
 
252
261
  <script>
253
- import {Replace} from "sasp-base";
262
+ import {Replace,WORK_GLOBAL} from "sasp-base";
254
263
  import FlowChart from "../flowChart";
255
264
  import FlowRoamRecord from "../flowRoamRecords";
256
265
 
@@ -459,11 +468,17 @@
459
468
  currentOptColumnWidth: this.optColumnWidth,
460
469
  screenWidth:"",
461
470
  screenHeight:"",
471
+ workTurnOn:false,
472
+ flowFormId: "",
473
+ formDefineKey: "",
474
+ title: "",
475
+ formSettingVisible:false,
462
476
  }
463
477
  },
464
478
  created() {
465
479
  this.init();
466
480
  this.getListButton();
481
+ this.initWorkStageTurnOn();
467
482
  if (this.showModel == "card") {
468
483
  this.checkScreenWidth();
469
484
  window.addEventListener('resize', () => { //监听浏览器窗口大小改变
@@ -475,7 +490,34 @@
475
490
  mounted() {
476
491
  },
477
492
  methods: {
478
-
493
+ initWorkStageTurnOn(){
494
+ this.workTurnOn = WORK_GLOBAL.getTurnOn(this.switchOnline,this.listViewId);
495
+ },
496
+ switchOnline(val){
497
+ this.workTurnOn = val;
498
+ },
499
+ /**
500
+ * 打开相关的智能建表
501
+ */
502
+ showFormSetting(){
503
+ this.axios.post(this.api.plPageInfo.find,{ flowId: this.flowDefine.id }).then(res => {
504
+ let pageInfo = (res.data || [])[0] || {};
505
+ this.pageName = pageInfo.pageName || "";
506
+ this.flowFormId = pageInfo.formId;
507
+ this.formDefineKey = pageInfo.formDefineKey;
508
+ this.title = "智能建表配置("+ (this.pageName) +")";
509
+ if (this.SASP_FORM_CONFIG_PACK) {
510
+ this.formSettingVisible = true;
511
+ } else {
512
+ let href = window.FORM_RENDER_URL + "/formPath/index.html#/vueFormEditRedirect" +
513
+ "?formId=" + this.flowFormId + "&defineKey=" + this.formDefineKey + "&title=" + this.title;
514
+ window.open(href,"_blank");
515
+ // let href = window.FORM_RENDER_URL + "/formPath/index.html#/vueFormEditRedirect" +
516
+ // "?flowId=" + this.flowDefine.id + "&type=flow";
517
+ // window.open(href,"_blank");
518
+ }
519
+ });
520
+ },
479
521
  /**
480
522
  * 根据类型加载不需要清楚的
481
523
  */
@@ -249,7 +249,7 @@
249
249
  :key="item.dataId"
250
250
  :label="userMap[item.startUserId]"
251
251
  :name="item.dataId" :closable="batchUpdateFormInfo.dataRows.length > 1" :lazy="true">
252
- <template>
252
+ <template v-if="batchUpdateFormInfo.formShow">
253
253
  <slot name="formInfo"></slot>
254
254
  </template>
255
255
  </el-tab-pane>
@@ -1044,7 +1044,7 @@
1044
1044
  arrRows.push(Object.assign({}, data));
1045
1045
  });
1046
1046
  Object.assign(this.batchUpdateFormInfo, {
1047
- formShow: false,
1047
+ formShow: true,
1048
1048
  dataRows: arrRows,
1049
1049
  pendingNums: arrRows.length,
1050
1050
  activeName: arrRows[0].dataId,
@@ -1053,7 +1053,7 @@
1053
1053
 
1054
1054
  this.flowBatchPendingDialog = true;
1055
1055
  this.initUpdateFlowForm(arrRows[0]).then(()=>{
1056
- this.batchUpdateFormInfo.formShow = true;
1056
+ // this.batchUpdateFormInfo.formShow = true;
1057
1057
  let ref='batchTableForm'+arrRows[0].dataId+'Ref'
1058
1058
 
1059
1059
  this.$nextTick(()=>{
@@ -1595,13 +1595,17 @@
1595
1595
  if (nextTab) {
1596
1596
  this.batchUpdateFormInfo.activeName = nextTab.dataId;
1597
1597
  this.batchUpdateFormInfo.batchDataId =nextTab.dataId;
1598
- this.initUpdateFlowForm(nextTab).then(()=>{
1599
- this.$nextTick(()=>{
1600
- let ref='batchTableForm'+nextTab.dataId+'Ref';
1601
- // this.$refs[ref][0].loadData().then(() => {
1602
- this.exeFlowEvent("handle","afterClick",nextTab.currentNode,ref);
1603
- // })
1604
- })
1598
+ this.batchUpdateFormInfo.formShow = false;
1599
+ this.$nextTick(() => {
1600
+ this.batchUpdateFormInfo.formShow = true;
1601
+ this.initUpdateFlowForm(nextTab).then(()=>{
1602
+ this.$nextTick(()=>{
1603
+ let ref='batchTableForm'+nextTab.dataId+'Ref';
1604
+ // this.$refs[ref][0].loadData().then(() => {
1605
+ this.exeFlowEvent("handle","afterClick",nextTab.currentNode,ref);
1606
+ // })
1607
+ })
1608
+ });
1605
1609
  });
1606
1610
  }
1607
1611
 
@@ -1861,13 +1865,15 @@
1861
1865
  background: 'rgba(0, 0, 0, 0.7)'
1862
1866
  })
1863
1867
  let currentInst = this.currentInst;
1864
- this.$confirm('确定要退回至上一个节点吗?', '警告', {
1868
+ this.$prompt('退回备注', '确定要退回至上一个节点吗?', {
1865
1869
  confirmButtonText: '确定',
1866
1870
  cancelButtonText: '取消',
1867
- }).then(() => {
1871
+ inputType: 'textarea',
1872
+ }).then(({ value }) => {
1868
1873
  this.axios.post(this.api.plFlowInst.backRewrite,
1869
1874
  {
1870
- taskId:currentInst.taskId
1875
+ taskId:currentInst.taskId,
1876
+ remarks: value
1871
1877
  }).then(res => {
1872
1878
  if (res && res.data && res.data.operateSuccess) {
1873
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
  });