cloud-web-corejs 1.0.286 → 1.0.287
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/mobile/wf/content.vue +6 -1
- package/src/components/wf/content.vue +3 -2
- package/src/components/wf/content2.vue +1 -1
- package/src/components/wf/wf.js +7 -0
- package/src/components/wf/wfActionItems.js +3 -0
- package/src/components/wf/wfTransferEnabled.js +54 -0
- package/src/components/xform/form-render/container-item/detail-item.vue +2 -0
- package/src/views/user/bill_setting/mixins/wf.js +8 -0
- package/src/views/user/bill_setting/render.vue +1 -1
- package/src/views/user/wf/wf_diy_attribute/edit.vue +1 -1
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
icon="iconfont icon-a-bohui1">{{ $t2('驳回', 'components.wf.reject') }}
|
|
43
43
|
</el-button>
|
|
44
44
|
<el-button type="primary" plain class="btn" @click="openChangeWfForm"
|
|
45
|
-
v-show="(wfInfo.toTransfer===null || wfInfo.toTransfer===undefined) ? wfInfo.toSubmit: wfInfo.toTransfer"
|
|
45
|
+
v-show="transferEnabled && ((wfInfo.toTransfer===null || wfInfo.toTransfer===undefined) ? wfInfo.toSubmit: wfInfo.toTransfer)"
|
|
46
46
|
icon="iconfont icon-zhuanban">{{ $t2('转办', 'components.wf.transfer') }}
|
|
47
47
|
</el-button>
|
|
48
48
|
<el-button type="primary" plain class="btn" @click="openUrgingDialog" v-show="wfInfo.toInterrupt"
|
|
@@ -402,6 +402,7 @@ import Vue from "vue";
|
|
|
402
402
|
import settingConfig from "@/settings";
|
|
403
403
|
import commonMixin from "../../../mixins/mobile/common/index";
|
|
404
404
|
import {getToken} from "../../../utils/auth";
|
|
405
|
+
import {isWfTransferEnabled, loadWfTransferEnabled} from "../../wf/wfTransferEnabled";
|
|
405
406
|
|
|
406
407
|
let configUtil = {
|
|
407
408
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
@@ -459,6 +460,9 @@ export default {
|
|
|
459
460
|
let that = this.viewTarget;
|
|
460
461
|
let _hideWf = that._hideWf || that.$attrs._hideWf;
|
|
461
462
|
return _hideWf === true || _hideWf === 'true';
|
|
463
|
+
},
|
|
464
|
+
transferEnabled() {
|
|
465
|
+
return isWfTransferEnabled();
|
|
462
466
|
}
|
|
463
467
|
},
|
|
464
468
|
data() {
|
|
@@ -739,6 +743,7 @@ export default {
|
|
|
739
743
|
},
|
|
740
744
|
initForAll() {
|
|
741
745
|
let that = getTarget(this);
|
|
746
|
+
loadWfTransferEnabled(that);
|
|
742
747
|
this.initWf(() => {
|
|
743
748
|
if (this.wfInfo.procInstId) {
|
|
744
749
|
this.initCurrentTask(this.wfInfo.procInstId, () => {
|
|
@@ -45,9 +45,10 @@
|
|
|
45
45
|
class="button-sty"
|
|
46
46
|
@click="openChangeWfForm"
|
|
47
47
|
v-show="
|
|
48
|
-
|
|
48
|
+
transferEnabled &&
|
|
49
|
+
(wfInfo.toTransfer === null || wfInfo.toTransfer === undefined
|
|
49
50
|
? wfInfo.toSubmit
|
|
50
|
-
: wfInfo.toTransfer
|
|
51
|
+
: wfInfo.toTransfer)
|
|
51
52
|
"
|
|
52
53
|
icon="iconfont icon-zhuanban"
|
|
53
54
|
>{{ $t2("转办", "components.wf.transfer") }}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
@click="rejectWfTask('reject')" v-show="wfInfo.toReject">驳回
|
|
33
33
|
</el-button>
|
|
34
34
|
<el-button type="primary" class="btn" :class="{on:operateType == 'transfer'}"
|
|
35
|
-
@click="openChangeWfForm('transfer')" v-show="wfInfo.toSubmit">转办
|
|
35
|
+
@click="openChangeWfForm('transfer')" v-show="transferEnabled && wfInfo.toSubmit">转办
|
|
36
36
|
</el-button>
|
|
37
37
|
<el-button type="primary" class="btn" :class="{on:operateType == 'urging'}"
|
|
38
38
|
@click="openUrgingDialog(null)" v-show="wfInfo.toInterrupt">催办
|
package/src/components/wf/wf.js
CHANGED
|
@@ -5,6 +5,7 @@ import {selectDialogMixins} from "../../mixins/selectDialog";
|
|
|
5
5
|
import {requireViewCompat} from "@base/utils/resolveViewComponent";
|
|
6
6
|
import {getWfButtonNames, loadWfButtonNames} from "./wfButtonName";
|
|
7
7
|
import {isWfAutoConfirm, loadWfAutoConfirm} from "./wfAutoConfirm";
|
|
8
|
+
import {isWfTransferEnabled, loadWfTransferEnabled} from "./wfTransferEnabled";
|
|
8
9
|
|
|
9
10
|
let configUtil = {
|
|
10
11
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
@@ -235,6 +236,10 @@ wfContentMixin = {
|
|
|
235
236
|
let that = this.viewTarget;
|
|
236
237
|
let _hideWf = that._hideWf || that.$attrs._hideWf;
|
|
237
238
|
return _hideWf === true || _hideWf === 'true';
|
|
239
|
+
},
|
|
240
|
+
//转办:param20,未配置默认开启。读 observable,接口回来后按钮条会重算
|
|
241
|
+
transferEnabled() {
|
|
242
|
+
return isWfTransferEnabled();
|
|
238
243
|
}
|
|
239
244
|
},
|
|
240
245
|
data() {
|
|
@@ -553,6 +558,8 @@ wfContentMixin = {
|
|
|
553
558
|
},
|
|
554
559
|
initForAll() {
|
|
555
560
|
let that = getTarget(this);
|
|
561
|
+
//转办 param20:与 initWf 并行拉,未配置默认开
|
|
562
|
+
loadWfTransferEnabled(that);
|
|
556
563
|
this.initWf(() => {
|
|
557
564
|
if (this.wfInfo.procInstId) {
|
|
558
565
|
this.initCurrentTask(this.wfInfo.procInstId, () => {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* buttonType 只在「平铺成独立按钮」时用得上(见 HEADER_STANDALONE_KEYS),
|
|
8
8
|
* 取值与流程模块按钮条里同名按钮保持一致。
|
|
9
9
|
*/
|
|
10
|
+
import { isWfTransferEnabled } from "./wfTransferEnabled";
|
|
10
11
|
|
|
11
12
|
/* 详情标题栏里不收进下拉、直接平铺成独立按钮的操作。
|
|
12
13
|
顺序按 getWfActionItems 的定义序,不按这里的书写序。 */
|
|
@@ -18,6 +19,8 @@ export function getWfActionItems(vm) {
|
|
|
18
19
|
= wfInfo.toTransfer === null || wfInfo.toTransfer === undefined
|
|
19
20
|
? !!wfInfo.toSubmit
|
|
20
21
|
: !!wfInfo.toTransfer;
|
|
22
|
+
//param20 关掉时整项不出,哪怕节点本身允许转办
|
|
23
|
+
toTransfer = isWfTransferEnabled() && toTransfer;
|
|
21
24
|
|
|
22
25
|
return [
|
|
23
26
|
{
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 流程转办开关:后台 wf_diy_attribute 的 param20,全局拉取一次后缓存。
|
|
3
|
+
* 格式 true/false,未配置时默认开启。
|
|
4
|
+
*/
|
|
5
|
+
import Vue from "vue";
|
|
6
|
+
|
|
7
|
+
const wfTransfer = Vue.observable({
|
|
8
|
+
enabled: true,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
let pending = null;
|
|
12
|
+
|
|
13
|
+
function parseEnabled(val) {
|
|
14
|
+
//只认明确关掉;布尔 false 和字符串 "false" 都关,其余(含没配)一律开
|
|
15
|
+
if (val === false || val === "false") return false;
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function isWfTransferEnabled() {
|
|
20
|
+
return wfTransfer.enabled !== false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 拉取转办开关。全局只发一次请求,重复调用复用同一个 promise。
|
|
25
|
+
* @param {Object} vm 任意 Vue 实例(取 $http),不传则退回 window.$vueRoot
|
|
26
|
+
* @returns {Promise<Boolean>}
|
|
27
|
+
*/
|
|
28
|
+
export function loadWfTransferEnabled(vm) {
|
|
29
|
+
if (pending) return pending;
|
|
30
|
+
let target = vm || window.$vueRoot;
|
|
31
|
+
if (!target || !target.$http) return Promise.resolve(wfTransfer.enabled);
|
|
32
|
+
let errored = false;
|
|
33
|
+
let request = new Promise((resolve) => {
|
|
34
|
+
target.$http({
|
|
35
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
36
|
+
method: "post",
|
|
37
|
+
data: { attributeKey: "param20" },
|
|
38
|
+
success: (res) => {
|
|
39
|
+
let val = res ? res.objx : null;
|
|
40
|
+
wfTransfer.enabled = parseEnabled(val);
|
|
41
|
+
resolve(wfTransfer.enabled);
|
|
42
|
+
},
|
|
43
|
+
fail: () => resolve(wfTransfer.enabled),
|
|
44
|
+
error: () => {
|
|
45
|
+
errored = true;
|
|
46
|
+
pending = null; //失败不锁死,下次进流程表单可重试
|
|
47
|
+
resolve(wfTransfer.enabled);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
//回调若是同步回来的(拦截器短路、单测桩),上面那句 pending = null 会被下面这句盖掉
|
|
52
|
+
pending = errored ? null : request;
|
|
53
|
+
return request;
|
|
54
|
+
}
|
|
@@ -177,6 +177,7 @@ import {
|
|
|
177
177
|
} from "../../../../components/wf/wfButtonName";
|
|
178
178
|
import { loadWfAutoConfirm } from "../../../../components/wf/wfAutoConfirm";
|
|
179
179
|
import { loadWfUserRange } from "../../../../components/wf/wfUserRange";
|
|
180
|
+
import { loadWfTransferEnabled } from "../../../../components/wf/wfTransferEnabled";
|
|
180
181
|
import settingConfig from "@/settings.js";
|
|
181
182
|
|
|
182
183
|
export default {
|
|
@@ -200,6 +201,7 @@ export default {
|
|
|
200
201
|
loadWfButtonNames(this);
|
|
201
202
|
loadWfAutoConfirm(this);
|
|
202
203
|
loadWfUserRange(this);
|
|
204
|
+
loadWfTransferEnabled(this);
|
|
203
205
|
}
|
|
204
206
|
},
|
|
205
207
|
mounted() {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import {isWfTransferEnabled, loadWfTransferEnabled} from "@base/components/wf/wfTransferEnabled";
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
data() {
|
|
3
5
|
return {
|
|
@@ -34,6 +36,11 @@ export default {
|
|
|
34
36
|
|
|
35
37
|
}
|
|
36
38
|
},
|
|
39
|
+
computed: {
|
|
40
|
+
transferEnabled() {
|
|
41
|
+
return isWfTransferEnabled();
|
|
42
|
+
}
|
|
43
|
+
},
|
|
37
44
|
methods: {
|
|
38
45
|
initCurrentPrefix() {
|
|
39
46
|
let url = this.billJson.getUrl;
|
|
@@ -43,6 +50,7 @@ export default {
|
|
|
43
50
|
},
|
|
44
51
|
async initWf(option) {
|
|
45
52
|
this.wfOption = option;
|
|
53
|
+
loadWfTransferEnabled(this);
|
|
46
54
|
let hasWf = false;
|
|
47
55
|
let wfInfo, currentTask, taskParam = {};
|
|
48
56
|
await this.initWfInfo(option).then(res => {
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
icon="iconfont icon-a-bohui1">{{ $t1('驳回') }}
|
|
301
301
|
</el-button>
|
|
302
302
|
<el-button class="btn" type="primary" @click="openChangeWfForm"
|
|
303
|
-
v-if="wfEnabled && ((wfInfo.toTransfer===null || wfInfo.toTransfer===undefined) ? wfInfo.toSubmit: wfInfo.toTransfer)"
|
|
303
|
+
v-if="wfEnabled && transferEnabled && ((wfInfo.toTransfer===null || wfInfo.toTransfer===undefined) ? wfInfo.toSubmit: wfInfo.toTransfer)"
|
|
304
304
|
icon="iconfont icon-zhuanban">{{ $t1('转办') }}
|
|
305
305
|
</el-button>
|
|
306
306
|
<!--end-->
|