cloud-web-corejs 1.0.54-dev.800 → 1.0.54-dev.801
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 +1 -1
- package/src/components/bizTab/BizBillActions.vue +2 -2
- package/src/components/bizTab/bizBillDetailMixin.js +27 -9
- package/src/components/excelExport/exportFieldDialog.vue +11 -9
- package/src/components/table/config.js +6 -4
- package/src/components/table/index.js +78 -22
- package/src/components/table/state.js +42 -0
- package/src/components/table/vxeFilter/index.js +4 -2
- package/src/components/table/vxeFilter/mixin.js +10 -4
- package/src/components/wf/content.vue +4 -0
- package/src/components/wf/wf.js +72 -23
- package/src/components/wf/wfActionDropdown.vue +58 -0
- package/src/components/wf/wfActionItems.js +116 -0
- package/src/components/wf/wfAutoConfirm.js +55 -0
- package/src/components/wf/wfUserRange.js +53 -0
- package/src/components/wf/wfUtil.js +20 -0
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +2 -1
- package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +5 -5
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +48 -26
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +16 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +13 -12
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +16 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/afterColumnsCreated-editor.vue +30 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
- package/src/components/xform/form-designer/setting-panel/property-editor/field-common/keyName-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +20 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -178
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +35 -2
- package/src/components/xform/form-render/container-item/detail-item.vue +8 -12
- package/src/components/xform/mixins/defaultHandle.js +18 -3
- package/src/views/user/outLink/cc_form_view.vue +33 -30
- package/src/components/xform/form-render/container-item/data-table-mixin copy.js +0 -5910
package/src/components/wf/wf.js
CHANGED
|
@@ -3,6 +3,8 @@ import {getToken} from "../../utils/auth";
|
|
|
3
3
|
import settingConfig from "@/settings.js";
|
|
4
4
|
import {selectDialogMixins} from "../../mixins/selectDialog";
|
|
5
5
|
import {requireViewCompat} from "@base/utils/resolveViewComponent";
|
|
6
|
+
import {getWfButtonNames, loadWfButtonNames} from "./wfButtonName";
|
|
7
|
+
import {isWfAutoConfirm, loadWfAutoConfirm} from "./wfAutoConfirm";
|
|
6
8
|
|
|
7
9
|
let configUtil = {
|
|
8
10
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
@@ -1681,7 +1683,9 @@ wfStartMixin = {
|
|
|
1681
1683
|
wfUserRangeEnabled: false,
|
|
1682
1684
|
preStartResult:[],
|
|
1683
1685
|
showSetCandidateDialog2:false,
|
|
1684
|
-
wfSubmitted: false
|
|
1686
|
+
wfSubmitted: false,
|
|
1687
|
+
//param19 自动确认:确认框延后到 subWfStartForm(保存之后、preStart 之后)再决定弹不弹
|
|
1688
|
+
deferStartConfirm: false
|
|
1685
1689
|
};
|
|
1686
1690
|
},
|
|
1687
1691
|
computed: {
|
|
@@ -1707,6 +1711,50 @@ wfStartMixin = {
|
|
|
1707
1711
|
});
|
|
1708
1712
|
})
|
|
1709
1713
|
},
|
|
1714
|
+
buildStartFormData(){
|
|
1715
|
+
return {
|
|
1716
|
+
modelId: this.wfStartForm.modelId,
|
|
1717
|
+
objTypeCode: this.code,
|
|
1718
|
+
objId: this.dataId,
|
|
1719
|
+
formData: this.startParam || {},
|
|
1720
|
+
formCode: this.formCode || null
|
|
1721
|
+
// name:this.wfName
|
|
1722
|
+
};
|
|
1723
|
+
},
|
|
1724
|
+
//启动确认框的默认文案。param18 配了按钮名就跟随它,没配维持原有的 $t2 兜底链。
|
|
1725
|
+
async getDefaultStartTip(){
|
|
1726
|
+
await loadWfButtonNames(getTarget(this));
|
|
1727
|
+
let btnName = getWfButtonNames().submitBtn;
|
|
1728
|
+
if (btnName) {
|
|
1729
|
+
//只能用 $t1(找不到 key 原样返回),$t2 在 i18n 命中 key 时会把拼进去的名字吞掉
|
|
1730
|
+
return this.$t1(`您确定要${btnName}吗?`);
|
|
1731
|
+
}
|
|
1732
|
+
let wfStartOperateName =
|
|
1733
|
+
settingConfig.wfStartOperateName ||
|
|
1734
|
+
settingConfig.wfStartButtonName ||
|
|
1735
|
+
"启动流程";
|
|
1736
|
+
return this.$t2(
|
|
1737
|
+
"您确定要" + wfStartOperateName + "吗?",
|
|
1738
|
+
'components.wf.startTip'
|
|
1739
|
+
);
|
|
1740
|
+
},
|
|
1741
|
+
/**
|
|
1742
|
+
* param19 延后的那道确认框,由 subWfStartForm 在 preStart 之后调。
|
|
1743
|
+
* @returns {Promise<Boolean>} true 继续启动,false 已取消
|
|
1744
|
+
*/
|
|
1745
|
+
async confirmDeferredStart(){
|
|
1746
|
+
let that = getTarget(this);
|
|
1747
|
+
let startTip = await this.getDefaultStartTip();
|
|
1748
|
+
try {
|
|
1749
|
+
await that.$baseConfirm(startTip);
|
|
1750
|
+
return true;
|
|
1751
|
+
} catch (e) {
|
|
1752
|
+
//这时候单据可能已经被自动保存过了,必须走 close() 触发 onCancel,
|
|
1753
|
+
//否则宿主那边的提交态(bizTab 的 billSubmitting 之类)没人来解,保存按钮会永久禁用。
|
|
1754
|
+
this.close();
|
|
1755
|
+
return false;
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1710
1758
|
initWfUserRangeParam(){
|
|
1711
1759
|
let that = getTarget(this);
|
|
1712
1760
|
return that.$http({
|
|
@@ -1783,16 +1831,25 @@ wfStartMixin = {
|
|
|
1783
1831
|
}
|
|
1784
1832
|
);
|
|
1785
1833
|
}
|
|
1786
|
-
let wfStartOperateName =
|
|
1787
|
-
settingConfig.wfStartOperateName ||
|
|
1788
|
-
settingConfig.wfStartButtonName ||
|
|
1789
|
-
"启动流程";
|
|
1790
|
-
let defaultStartTip = "您确定要" + wfStartOperateName + "吗?";
|
|
1791
1834
|
let startTip;
|
|
1792
1835
|
if (typeof customStartTip === "string" && customStartTip.trim()) {
|
|
1836
|
+
//模板脚本 wfStartConfirmText 自定义的提示语:多是金额超限之类的业务告警,
|
|
1837
|
+
//必须由人确认,不受 param19 自动确认影响。
|
|
1793
1838
|
startTip = customStartTip;
|
|
1794
1839
|
} else {
|
|
1795
|
-
|
|
1840
|
+
//系统默认文案才受自动确认开关管
|
|
1841
|
+
await loadWfAutoConfirm(that);
|
|
1842
|
+
//param12 关着时压根不会有「修改候选人」弹框,延后就没有意义,
|
|
1843
|
+
//确认框留在原位(保存之前);两个开关都为 true 才延后。
|
|
1844
|
+
if (isWfAutoConfirm() && this.wfUserRangeEnabled) {
|
|
1845
|
+
//确认框延后到 subWfStartForm:那里才是「单据已保存(如果开了自动保存)、
|
|
1846
|
+
//preStart 也探过」的时点。探到候选人就由「修改候选人」弹框顶替这道确认框,
|
|
1847
|
+
//探不到才把它补上——没有候选人弹框时它是唯一的把关,不能省。
|
|
1848
|
+
this.deferStartConfirm = true;
|
|
1849
|
+
this.startSubmit();
|
|
1850
|
+
return;
|
|
1851
|
+
}
|
|
1852
|
+
startTip = await this.getDefaultStartTip();
|
|
1796
1853
|
}
|
|
1797
1854
|
that
|
|
1798
1855
|
.$baseConfirm(startTip)
|
|
@@ -1827,30 +1884,22 @@ wfStartMixin = {
|
|
|
1827
1884
|
return false;
|
|
1828
1885
|
}
|
|
1829
1886
|
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
var objId = this.dataId;
|
|
1833
|
-
|
|
1834
|
-
let startParam = this.startParam || {};
|
|
1835
|
-
let formCode = this.formCode || null;
|
|
1836
|
-
|
|
1837
|
-
var data = {
|
|
1838
|
-
modelId: modelId,
|
|
1839
|
-
objTypeCode: this.code,
|
|
1840
|
-
objId: objId,
|
|
1841
|
-
formData: startParam,
|
|
1842
|
-
formCode: formCode
|
|
1843
|
-
// name:this.wfName
|
|
1844
|
-
};
|
|
1845
|
-
this.startFormData = data;
|
|
1887
|
+
this.startFormData = this.buildStartFormData();
|
|
1846
1888
|
|
|
1847
1889
|
if(this.wfUserRangeEnabled){
|
|
1848
1890
|
this.preStartResult = await this.preStart() || []
|
|
1849
1891
|
if(this.preStartResult.length){
|
|
1892
|
+
//有候选人弹框顶替确认框,param19 延后的那道就不用补了
|
|
1893
|
+
this.deferStartConfirm = false;
|
|
1850
1894
|
this.openSetCandidateDialog()
|
|
1851
1895
|
return
|
|
1852
1896
|
}
|
|
1853
1897
|
}
|
|
1898
|
+
//没有候选人弹框 → 把 param19 延后的确认框补上(见 initWfInfo)
|
|
1899
|
+
if (this.deferStartConfirm) {
|
|
1900
|
+
this.deferStartConfirm = false;
|
|
1901
|
+
if (!(await this.confirmDeferredStart())) return;
|
|
1902
|
+
}
|
|
1854
1903
|
this.startSubmitHanlde(this.startFormData);
|
|
1855
1904
|
|
|
1856
1905
|
},
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="button-sty" v-show="items.length">
|
|
3
|
+
<el-dropdown trigger="hover">
|
|
4
|
+
<el-button type="primary" class="button-sty">
|
|
5
|
+
{{ $t1("流程操作") }}
|
|
6
|
+
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
7
|
+
</el-button>
|
|
8
|
+
<el-dropdown-menu slot="dropdown">
|
|
9
|
+
<el-dropdown-item
|
|
10
|
+
v-for="item in items"
|
|
11
|
+
:key="item.key"
|
|
12
|
+
:icon="item.elIcon"
|
|
13
|
+
@click.native="item.run(wfVm)"
|
|
14
|
+
>
|
|
15
|
+
<i v-if="item.iconClass" :class="item.iconClass"></i>
|
|
16
|
+
{{ itemLabel(item) }}
|
|
17
|
+
</el-dropdown-item>
|
|
18
|
+
</el-dropdown-menu>
|
|
19
|
+
</el-dropdown>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import { getVisibleWfActionItems } from "./wfActionItems";
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: "WfActionDropdown",
|
|
28
|
+
props: {
|
|
29
|
+
// 流程面板实例(content.vue),下拉项显隐读它的 wfInfo,点击调它的方法
|
|
30
|
+
wfVm: {
|
|
31
|
+
type: Object,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
computed: {
|
|
36
|
+
// 求值时会读 wfVm 上的响应式字段,跨实例也能跟着流程状态更新
|
|
37
|
+
items() {
|
|
38
|
+
return getVisibleWfActionItems(this.wfVm);
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
methods: {
|
|
42
|
+
itemLabel(item) {
|
|
43
|
+
if (item.i18nPath) {
|
|
44
|
+
return this.$t2(item.defaultLabel, item.i18nPath);
|
|
45
|
+
}
|
|
46
|
+
return this.$t1 ? this.$t1(item.defaultLabel) : item.defaultLabel;
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style scoped>
|
|
53
|
+
.wf-action-dropdown-wrap {
|
|
54
|
+
display: inline-block;
|
|
55
|
+
vertical-align: middle;
|
|
56
|
+
margin-right: 10px;
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 流程审批操作清单。详情标题栏下拉与流程模块按钮条共用同一套显隐条件,
|
|
3
|
+
* 避免两处各写一遍之后漂移。
|
|
4
|
+
*
|
|
5
|
+
* vm 是 content.vue 实例(挂了 wfContentMixin)。
|
|
6
|
+
*/
|
|
7
|
+
export function getWfActionItems(vm) {
|
|
8
|
+
let wfInfo = (vm && vm.wfInfo) || {};
|
|
9
|
+
let toTransfer =
|
|
10
|
+
wfInfo.toTransfer === null || wfInfo.toTransfer === undefined
|
|
11
|
+
? !!wfInfo.toSubmit
|
|
12
|
+
: !!wfInfo.toTransfer;
|
|
13
|
+
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
key: "agree",
|
|
17
|
+
show: !!wfInfo.toSubmit,
|
|
18
|
+
defaultLabel: "通过",
|
|
19
|
+
i18nPath: "components.wf.agree",
|
|
20
|
+
iconClass: "iconfont icon-tongguo",
|
|
21
|
+
run: (wfVm) => wfVm.openAgreeDialog(),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: "manual",
|
|
25
|
+
show: !!wfInfo.toInterrupt,
|
|
26
|
+
defaultLabel: "中断",
|
|
27
|
+
i18nPath: "components.wf.manual",
|
|
28
|
+
iconClass: "iconfont icon-caozuozhongduan",
|
|
29
|
+
run: (wfVm) => wfVm.openManualDialog(),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
key: "reject",
|
|
33
|
+
show: !!wfInfo.toReject,
|
|
34
|
+
defaultLabel: "驳回",
|
|
35
|
+
i18nPath: "components.wf.reject",
|
|
36
|
+
iconClass: "iconfont icon-a-bohui1",
|
|
37
|
+
run: (wfVm) => wfVm.rejectWfTask(),
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: "transfer",
|
|
41
|
+
show: toTransfer,
|
|
42
|
+
defaultLabel: "转办",
|
|
43
|
+
i18nPath: "components.wf.transfer",
|
|
44
|
+
iconClass: "iconfont icon-zhuanban",
|
|
45
|
+
run: (wfVm) => wfVm.openChangeWfForm(),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: "urging",
|
|
49
|
+
show: !!wfInfo.toInterrupt,
|
|
50
|
+
defaultLabel: "催办",
|
|
51
|
+
i18nPath: "components.wf.urging",
|
|
52
|
+
iconClass: "iconfont icon-cuiban",
|
|
53
|
+
run: (wfVm) => wfVm.openUrgingDialog(),
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
key: "addIncreaseSign",
|
|
57
|
+
show: !!(vm.increaseSignEnabled && wfInfo.toAddIncreaseSign),
|
|
58
|
+
defaultLabel: "加签",
|
|
59
|
+
i18nPath: "components.wf.addIncreaseSign",
|
|
60
|
+
elIcon: "el-icon-plus",
|
|
61
|
+
run: (wfVm) => wfVm.openAddIncreaseSign(),
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
key: "deleteIncreaseSign",
|
|
65
|
+
show: !!(vm.increaseSignEnabled && wfInfo.toDeleteIncreaseSign),
|
|
66
|
+
defaultLabel: "减签",
|
|
67
|
+
i18nPath: "components.wf.deleteIncreaseSign",
|
|
68
|
+
elIcon: "el-icon-delete",
|
|
69
|
+
run: (wfVm) => wfVm.openDeleteTaskUserDialog(),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: "talk",
|
|
73
|
+
show: !!(vm.toTalk && wfInfo.toLinkup),
|
|
74
|
+
defaultLabel: "沟通",
|
|
75
|
+
i18nPath: "components.wf.talk",
|
|
76
|
+
elIcon: "el-icon-chat-dot-square",
|
|
77
|
+
run: (wfVm) => wfVm.openTalkDialog(),
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
key: "setCandidate",
|
|
81
|
+
show: !!wfInfo.toSetCandidate,
|
|
82
|
+
defaultLabel: "修改候选人",
|
|
83
|
+
i18nPath: "components.wf.setCandidate",
|
|
84
|
+
elIcon: "el-icon-user",
|
|
85
|
+
run: (wfVm) => wfVm.openSetCandidateDialog(null),
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
key: "revoke",
|
|
89
|
+
show: !!wfInfo.toRevoke,
|
|
90
|
+
defaultLabel: "撤回",
|
|
91
|
+
i18nPath: "components.wf.revoke",
|
|
92
|
+
elIcon: "el-icon-document-delete",
|
|
93
|
+
run: (wfVm) => wfVm.openRevokeDialog(null),
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
key: "addOpinion",
|
|
97
|
+
show: !!vm.showAddOpinionButton,
|
|
98
|
+
defaultLabel: "补充意见",
|
|
99
|
+
run: (wfVm) => {
|
|
100
|
+
let btn = wfVm.$refs && wfVm.$refs.addOpinionBtn;
|
|
101
|
+
if (btn && btn.openDialog) btn.openDialog();
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
key: "editScript",
|
|
106
|
+
show: !!wfInfo.wfAdmin,
|
|
107
|
+
defaultLabel: "修改脚本",
|
|
108
|
+
elIcon: "el-icon-edit",
|
|
109
|
+
run: (wfVm) => wfVm.openWfFlowEleScriptDialog(),
|
|
110
|
+
},
|
|
111
|
+
];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function getVisibleWfActionItems(vm) {
|
|
115
|
+
return getWfActionItems(vm).filter((item) => item.show);
|
|
116
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 流程提交确认框自动确认:由后台 wf_diy_attribute 的 param19 统一维护,全局拉取一次后缓存。
|
|
3
|
+
* 返回 true 时,「提交流程」「保存并提交流程」的系统默认确认框不再弹,直接按「确定」处理。
|
|
4
|
+
*
|
|
5
|
+
* 不含表单模板脚本 wfStartConfirmText 自定义的提示语——业务方常拿它做金额超限之类的告警,
|
|
6
|
+
* 那种提示必须由人确认,不能被这个全局开关吞掉(判定在 wf.js 的启动确认分支)。
|
|
7
|
+
*/
|
|
8
|
+
import Vue from "vue";
|
|
9
|
+
|
|
10
|
+
/* 与 wfButtonName.js 同款:缓存必须是响应式的,值后到时读取方才能重算。
|
|
11
|
+
这里语义是「没配就不自动确认」,所以初值直接给 false,不需要区分未配置。 */
|
|
12
|
+
const wfAutoConfirm = Vue.observable({
|
|
13
|
+
enabled: false,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
let pending = null;
|
|
17
|
+
|
|
18
|
+
export function isWfAutoConfirm() {
|
|
19
|
+
return wfAutoConfirm.enabled === true;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 拉取自动确认开关。全局只发一次请求,重复调用复用同一个 promise。
|
|
24
|
+
* @param {Object} vm 任意 Vue 实例(取 $http),不传则退回 window.$vueRoot
|
|
25
|
+
* @returns {Promise<Boolean>}
|
|
26
|
+
*/
|
|
27
|
+
export function loadWfAutoConfirm(vm) {
|
|
28
|
+
if (pending) return pending;
|
|
29
|
+
let target = vm || window.$vueRoot;
|
|
30
|
+
if (!target || !target.$http) return Promise.resolve(wfAutoConfirm.enabled);
|
|
31
|
+
let errored = false;
|
|
32
|
+
let request = new Promise((resolve) => {
|
|
33
|
+
target.$http({
|
|
34
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
35
|
+
method: "post",
|
|
36
|
+
data: { attributeKey: "param19" },
|
|
37
|
+
success: (res) => {
|
|
38
|
+
let val = res ? res.objx : null;
|
|
39
|
+
//后台可能回布尔也可能回字符串,两种都认;其余(含没配)一律当关
|
|
40
|
+
wfAutoConfirm.enabled = val === true || val === "true";
|
|
41
|
+
resolve(wfAutoConfirm.enabled);
|
|
42
|
+
},
|
|
43
|
+
fail: () => resolve(wfAutoConfirm.enabled),
|
|
44
|
+
error: () => {
|
|
45
|
+
errored = true;
|
|
46
|
+
pending = null; //失败不锁死,下次进流程表单可重试
|
|
47
|
+
resolve(wfAutoConfirm.enabled);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
//回调若是同步回来的(拦截器短路、单测桩),上面那句 pending = null 会被下面这句盖掉,
|
|
52
|
+
//于是重试永远拿到那个已 settle 的旧 promise —— 用 errored 补一刀。
|
|
53
|
+
pending = errored ? null : request;
|
|
54
|
+
return request;
|
|
55
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 「节点候选人范围」开关:后台 wf_diy_attribute 的 param12,全局拉取一次后缓存。
|
|
3
|
+
* 开着时启动流程会先打 /wf/preStart,返回候选人则弹「修改候选人」弹框(见 wf.js subWfStartForm)。
|
|
4
|
+
*
|
|
5
|
+
* wfStartDialog 内部另有一份 initWfUserRangeParam(),每次开弹框现取,那份是启动流程的权威判定,
|
|
6
|
+
* 不动它。这里这份只服务于弹框之外的调用方——「保存并提交」要在**保存之前**就知道这个开关,
|
|
7
|
+
* 才能决定确认框是当场弹(param12 关,后面不可能有候选人弹框)还是延后给弹框(param12 开)。
|
|
8
|
+
*/
|
|
9
|
+
import Vue from "vue";
|
|
10
|
+
|
|
11
|
+
const wfUserRange = Vue.observable({
|
|
12
|
+
enabled: false,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
let pending = null;
|
|
16
|
+
|
|
17
|
+
export function isWfUserRangeEnabled() {
|
|
18
|
+
return wfUserRange.enabled === true;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 拉取开关。全局只发一次请求,重复调用复用同一个 promise。
|
|
23
|
+
* @param {Object} vm 任意 Vue 实例(取 $http),不传则退回 window.$vueRoot
|
|
24
|
+
* @returns {Promise<Boolean>}
|
|
25
|
+
*/
|
|
26
|
+
export function loadWfUserRange(vm) {
|
|
27
|
+
if (pending) return pending;
|
|
28
|
+
let target = vm || window.$vueRoot;
|
|
29
|
+
if (!target || !target.$http) return Promise.resolve(wfUserRange.enabled);
|
|
30
|
+
let errored = false;
|
|
31
|
+
let request = new Promise((resolve) => {
|
|
32
|
+
target.$http({
|
|
33
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
34
|
+
method: "post",
|
|
35
|
+
data: { attributeKey: "param12" },
|
|
36
|
+
success: (res) => {
|
|
37
|
+
let val = res ? res.objx : null;
|
|
38
|
+
//与 wf.js initWfUserRangeParam 同口径,字符串 "true" 一并认
|
|
39
|
+
wfUserRange.enabled = val === true || val === "true";
|
|
40
|
+
resolve(wfUserRange.enabled);
|
|
41
|
+
},
|
|
42
|
+
fail: () => resolve(wfUserRange.enabled),
|
|
43
|
+
error: () => {
|
|
44
|
+
errored = true;
|
|
45
|
+
pending = null; //失败不锁死,下次进流程表单可重试
|
|
46
|
+
resolve(wfUserRange.enabled);
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
//回调同步回来时(拦截器短路、单测桩),上面那句 pending = null 会被下面这句盖掉,补一刀
|
|
51
|
+
pending = errored ? null : request;
|
|
52
|
+
return request;
|
|
53
|
+
}
|
|
@@ -81,6 +81,7 @@ f = async function (option) {
|
|
|
81
81
|
|
|
82
82
|
let showStartBtn = option.showStartBtn != null ? option.showStartBtn : true;
|
|
83
83
|
let showModifyBtn = option.showModifyBtn != null ? option.showModifyBtn : true;
|
|
84
|
+
let contentInstance = null; //流程面板实例,标题栏下拉要点它的方法
|
|
84
85
|
|
|
85
86
|
if (wfInfo) {
|
|
86
87
|
let wfModel = configUtil.settingConfig.wfModel || 1;
|
|
@@ -101,6 +102,7 @@ f = async function (option) {
|
|
|
101
102
|
}
|
|
102
103
|
});
|
|
103
104
|
instances.push(instance);
|
|
105
|
+
contentInstance = instance;
|
|
104
106
|
let _hideWf = that._hideWf || that.$attrs._hideWf;
|
|
105
107
|
let isHideWf = _hideWf === true || _hideWf === 'true';
|
|
106
108
|
if (!_hideWf && slideWrap) {
|
|
@@ -196,6 +198,24 @@ f = async function (option) {
|
|
|
196
198
|
appendPrevChildDom(wfBtnRegion, startVm.$mount().$el)
|
|
197
199
|
}
|
|
198
200
|
|
|
201
|
+
/* 审批操作下拉:开了 wfActionInHeaderEnabled 时,在详情模块标题栏再挂一份「流程操作」
|
|
202
|
+
下拉。流程模块里的原按钮条不动、不隐藏;下拉项点击走流程面板实例上的同一套方法。
|
|
203
|
+
放在「修改单据」「流程启动」之后挂——appendPrevChildDom 是前插,最后插的排最左,
|
|
204
|
+
最终顺序:流程操作下拉 → 修改单据 → 内建/业务按钮。
|
|
205
|
+
hiddenAllButton / 素身详情(取不到 .fr) 自动跳过。 */
|
|
206
|
+
let actionInHeader = option.actionInHeader != null
|
|
207
|
+
? option.actionInHeader
|
|
208
|
+
: configUtil.settingConfig.wfActionInHeaderEnabled === true;
|
|
209
|
+
if (actionInHeader && wfBtnRegion && contentInstance && !option.hiddenAllButton) {
|
|
210
|
+
let Dropdown = configUtil.Vue.extend(configUtil.getWfObj('/wfActionDropdown.vue'));
|
|
211
|
+
let dropdownVm = new Dropdown({
|
|
212
|
+
i18n: that._i18n,
|
|
213
|
+
propsData: { wfVm: contentInstance }
|
|
214
|
+
});
|
|
215
|
+
instances.push(dropdownVm);
|
|
216
|
+
appendPrevChildDom(wfBtnRegion, dropdownVm.$mount().$el);
|
|
217
|
+
}
|
|
218
|
+
|
|
199
219
|
registerDispose();
|
|
200
220
|
}
|
|
201
221
|
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
|
|
80
80
|
<script>
|
|
81
81
|
import {selectDialogMixins} from '../../../../../mixins/selectDialog/index.js';
|
|
82
|
+
import {getTableStateValue} from '../../../../../components/table/state';
|
|
82
83
|
|
|
83
84
|
export default {
|
|
84
85
|
name: "vabSearchDialog",
|
|
@@ -234,7 +235,7 @@ export default {
|
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
var $grid = this.$refs[tableRef];
|
|
237
|
-
let isQueryAllPage = $grid
|
|
238
|
+
let isQueryAllPage = getTableStateValue($grid, 'isQueryAllPage');
|
|
238
239
|
let pathStr1 = "";
|
|
239
240
|
if (isQueryAllPage === false) {
|
|
240
241
|
queryParams.searchCount = false;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</el-form-item>
|
|
9
9
|
|
|
10
10
|
<template v-if="formConfig.dynamicFieldEnabled">
|
|
11
|
-
<el-form-item label="数据来源">
|
|
11
|
+
<el-form-item label="数据来源" class="form-item-label-top">
|
|
12
12
|
<el-radio-group v-model="formConfig.dynamicFieldSourceType" size="mini">
|
|
13
13
|
<el-radio-button label="local">本地规则</el-radio-button>
|
|
14
14
|
<el-radio-button label="script">后台脚本</el-radio-button>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</el-form-item>
|
|
17
17
|
|
|
18
18
|
<template v-if="formConfig.dynamicFieldSourceType === 'local'">
|
|
19
|
-
<el-form-item label="字段规则">
|
|
19
|
+
<el-form-item label="字段规则" class="el-form-item-second">
|
|
20
20
|
<el-button
|
|
21
21
|
type="primary"
|
|
22
22
|
plain
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<template v-if="formConfig.dynamicFieldSourceType === 'script'">
|
|
33
|
-
<el-form-item class="form-item-label-top" label="脚本编码">
|
|
33
|
+
<el-form-item class="form-item-label-top el-form-item-second" label="脚本编码">
|
|
34
34
|
<el-input
|
|
35
35
|
v-model="formConfig.dynamicFieldScriptCode"
|
|
36
36
|
size="mini"
|
|
37
37
|
placeholder="scriptCode 或 formCode/scriptCode"
|
|
38
38
|
></el-input>
|
|
39
39
|
</el-form-item>
|
|
40
|
-
<el-form-item label="额外参数">
|
|
40
|
+
<el-form-item label="额外参数" class="el-form-item-second">
|
|
41
41
|
<a
|
|
42
42
|
href="javascript:void(0);"
|
|
43
43
|
class="a-link link-oneLind"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
formModel.status }
|
|
52
52
|
</div>
|
|
53
53
|
</el-form-item>
|
|
54
|
-
<el-form-item class="form-item-label-top" label="触发字段">
|
|
54
|
+
<el-form-item class="form-item-label-top el-form-item-second" label="触发字段">
|
|
55
55
|
<el-select
|
|
56
56
|
v-model="formConfig.dynamicFieldTriggerFields"
|
|
57
57
|
multiple
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
</div>
|
|
229
229
|
|
|
230
230
|
<div class="wf-group-title">提交入口(按钮)</div>
|
|
231
|
-
<el-form-item v-if="formConfig.wfEnabled">
|
|
231
|
+
<el-form-item v-if="formConfig.wfEnabled" class="form-item-label-red">
|
|
232
232
|
<span slot="label">
|
|
233
233
|
{{ i18nt("新增页启用「保存并提交流程」按钮") }}
|
|
234
234
|
<el-tooltip effect="light" placement="top">
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
</el-collapse-item>
|
|
360
360
|
<el-collapse-item name="4" title="列表标签页信息(仅列表表单生效)">
|
|
361
361
|
<el-form-item label-width="0">
|
|
362
|
-
<span style="color:
|
|
362
|
+
<span style="color:rgba(0,0,0,0.45); font-size: 12px; line-height: 1.6;display:block;">
|
|
363
363
|
本组配置只从「查询列表页」所用的表单读取,在详情/编辑表单里设置不会生效
|
|
364
364
|
</span>
|
|
365
365
|
</el-form-item>
|
|
@@ -374,14 +374,15 @@
|
|
|
374
374
|
</el-form-item>
|
|
375
375
|
<el-form-item
|
|
376
376
|
v-if="formConfig.multiTabEnabled"
|
|
377
|
-
:label="i18nt('新增打开页签')"
|
|
377
|
+
:label="i18nt('新增打开页签')"
|
|
378
|
+
class="el-form-item-second"
|
|
378
379
|
>
|
|
379
380
|
<el-switch v-model="formConfig.addTabEnabled"></el-switch>
|
|
380
381
|
<span style="margin-left: 8px; color: #999; font-size: 12px">
|
|
381
382
|
开启后新增打开独立可关闭页签,需配置「标签名称字段」
|
|
382
383
|
</span>
|
|
383
384
|
</el-form-item>
|
|
384
|
-
<el-form-item :label="i18nt('流程启动后行为')">
|
|
385
|
+
<el-form-item :label="i18nt('流程启动后行为')" class="form-item-label-top">
|
|
385
386
|
<el-radio-group v-model="formConfig.submitBehavior">
|
|
386
387
|
<el-radio label="closeToList">关闭页签并回列表刷新</el-radio>
|
|
387
388
|
<el-radio label="refreshCurrent">刷新当前页签</el-radio>
|
|
@@ -405,8 +406,7 @@
|
|
|
405
406
|
<el-form-item :label="i18nt('隐藏常规标签')">
|
|
406
407
|
<el-switch v-model="formConfig.hideNormalTab"></el-switch>
|
|
407
408
|
</el-form-item>
|
|
408
|
-
<el-form-item :label="i18nt('其他标签页配置')"
|
|
409
|
-
<el-form-item class="form-item-label-top" label-width="0">
|
|
409
|
+
<el-form-item :label="i18nt('其他标签页配置')" class="form-item-label-top" label-width="0">
|
|
410
410
|
<div>
|
|
411
411
|
<draggable
|
|
412
412
|
tag="ul"
|
|
@@ -480,7 +480,8 @@
|
|
|
480
480
|
<el-collapse-item
|
|
481
481
|
v-if="showEventCollapse()"
|
|
482
482
|
name="7"
|
|
483
|
-
:title="i18nt('designer.setting.eventSetting')"
|
|
483
|
+
:title="i18nt('designer.setting.eventSetting')"
|
|
484
|
+
class="form-item-label-red"
|
|
484
485
|
>
|
|
485
486
|
<!-- <el-form-item label="onBeforeCreated" label-width="150px">
|
|
486
487
|
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
@@ -1713,15 +1714,23 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
|
|
|
1713
1714
|
|
|
1714
1715
|
<style lang="scss" scoped>
|
|
1715
1716
|
.setting-form {
|
|
1716
|
-
::v-deep .el-form-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1717
|
+
::v-deep .el-form-item{
|
|
1718
|
+
.el-form-item__label {
|
|
1719
|
+
font-size: 13px;
|
|
1720
|
+
//text-overflow: ellipsis;
|
|
1721
|
+
overflow: hidden;
|
|
1722
|
+
white-space: nowrap;
|
|
1723
|
+
}
|
|
1724
|
+
&.el-form-item--mini.el-form-item {
|
|
1725
|
+
margin-bottom: 6px;
|
|
1726
|
+
}
|
|
1727
|
+
&.el-form-item-second{
|
|
1728
|
+
.el-form-item__label{
|
|
1729
|
+
padding-left:4px;
|
|
1730
|
+
&:before{content:"";width:5px;height:2px;background:#FF4D4F;display:inline-block;margin-right:4px;}
|
|
1731
|
+
span{flex:1}
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1725
1734
|
}
|
|
1726
1735
|
|
|
1727
1736
|
.radio-group-custom {
|
|
@@ -1747,17 +1756,30 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
|
|
|
1747
1756
|
}
|
|
1748
1757
|
|
|
1749
1758
|
/* 折叠组内部的二级分组标题,用于把长配置组切成几段(如「流程信息」) */
|
|
1750
|
-
.wf-group-title {
|
|
1751
|
-
margin:
|
|
1752
|
-
padding-left: 8px;
|
|
1753
|
-
border-left: 3px solid #
|
|
1754
|
-
color:
|
|
1755
|
-
font-size: 13px;
|
|
1756
|
-
font-weight: 600;
|
|
1757
|
-
line-height: 1.3;
|
|
1758
|
-
|
|
1759
|
+
::v-deep .wf-group-title {
|
|
1760
|
+
margin: 16px 0 8px;
|
|
1761
|
+
padding-left: 8px;
|
|
1762
|
+
//border-left: 3px solid #0073E5;
|
|
1763
|
+
color: rgba(0,0,0,.65);
|
|
1764
|
+
font-size: 13px;
|
|
1765
|
+
font-weight: 600;
|
|
1766
|
+
line-height: 1.3;
|
|
1767
|
+
background: rgba(0,0,0,0.04);
|
|
1768
|
+
padding: 4px 0 4px 8px;
|
|
1759
1769
|
&:first-child {
|
|
1760
|
-
margin-top:
|
|
1770
|
+
margin-top: 0;
|
|
1771
|
+
}
|
|
1772
|
+
~ .el-form-item{
|
|
1773
|
+
.el-form-item__label{
|
|
1774
|
+
padding-left:4px;
|
|
1775
|
+
&:before{content:"";width:5px;height:2px;background:#0073e5;display:inline-block;margin-right:4px;}
|
|
1776
|
+
span{flex:1}
|
|
1777
|
+
}
|
|
1778
|
+
&.form-item-label-red{
|
|
1779
|
+
.el-form-item__label:before{
|
|
1780
|
+
background:#FF4D4F
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1761
1783
|
}
|
|
1762
1784
|
}
|
|
1763
1785
|
|