widget.qw 1.0.50 → 1.0.52
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/build/style.css +9 -9
- package/build/widget.qw.es.js +59 -25
- package/build/widget.qw.umd.js +59 -25
- package/package.json +1 -1
- package/src/components/AuditBar.vue +81 -28
package/build/style.css
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
@charset "UTF-8";.widget[data-v-
|
|
1
|
+
@charset "UTF-8";.widget[data-v-47d3612b] {
|
|
2
2
|
text-align: center;
|
|
3
3
|
padding: 15px 15px;
|
|
4
4
|
}
|
|
5
|
-
.memo[data-v-
|
|
5
|
+
.memo[data-v-47d3612b] {
|
|
6
6
|
margin-bottom: 15px;
|
|
7
7
|
}
|
|
8
|
-
.refuse-btn[data-v-
|
|
8
|
+
.refuse-btn[data-v-47d3612b] {
|
|
9
9
|
width: 120px;
|
|
10
10
|
margin-right: 15px;
|
|
11
11
|
}
|
|
12
|
-
.pass-btn[data-v-
|
|
12
|
+
.pass-btn[data-v-47d3612b] {
|
|
13
13
|
width: 120px;
|
|
14
14
|
}
|
|
15
|
-
.apply-btn[data-v-
|
|
15
|
+
.apply-btn[data-v-47d3612b] {
|
|
16
16
|
width: 60vw;
|
|
17
17
|
}
|
|
18
|
-
.task-list[data-v-
|
|
18
|
+
.task-list[data-v-47d3612b] {
|
|
19
19
|
margin-top: 15px;
|
|
20
20
|
}
|
|
21
|
-
.task-title[data-v-
|
|
21
|
+
.task-title[data-v-47d3612b] {
|
|
22
22
|
font-size: 14px;
|
|
23
23
|
font-weight: bold;
|
|
24
24
|
color: #333;
|
|
25
25
|
text-align: left;
|
|
26
26
|
}
|
|
27
|
-
.task-user[data-v-
|
|
27
|
+
.task-user[data-v-47d3612b] {
|
|
28
28
|
font-size: 13px;
|
|
29
29
|
color: #666;
|
|
30
30
|
text-align: left;
|
|
31
31
|
margin-top: 5px;
|
|
32
32
|
}
|
|
33
|
-
.audit-title[data-v-
|
|
33
|
+
.audit-title[data-v-47d3612b] {
|
|
34
34
|
padding: 25px 15px 0 15px;
|
|
35
35
|
font-size: 16px;
|
|
36
36
|
font-weight: bold;
|
package/build/widget.qw.es.js
CHANGED
|
@@ -15766,7 +15766,7 @@ var lodash$1 = { exports: {} };
|
|
|
15766
15766
|
}).call(commonjsGlobal);
|
|
15767
15767
|
})(lodash$1, lodash$1.exports);
|
|
15768
15768
|
var lodash = lodash$1.exports;
|
|
15769
|
-
var AuditBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-
|
|
15769
|
+
var AuditBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-47d3612b] {\n text-align: center;\n padding: 15px 15px;\n}\n.memo[data-v-47d3612b] {\n margin-bottom: 15px;\n}\n.refuse-btn[data-v-47d3612b] {\n width: 120px;\n margin-right: 15px;\n}\n.pass-btn[data-v-47d3612b] {\n width: 120px;\n}\n.apply-btn[data-v-47d3612b] {\n width: 60vw;\n}\n.task-list[data-v-47d3612b] {\n margin-top: 15px;\n}\n.task-title[data-v-47d3612b] {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n text-align: left;\n}\n.task-user[data-v-47d3612b] {\n font-size: 13px;\n color: #666;\n text-align: left;\n margin-top: 5px;\n}\n.audit-title[data-v-47d3612b] {\n padding: 25px 15px 0 15px;\n font-size: 16px;\n font-weight: bold;\n color: #666;\n text-align: left;\n}")();
|
|
15770
15770
|
var AuditBar_vue_vue_type_style_index_1_lang = /* @__PURE__ */ (() => "\n:root:root {\r\n --van-popover-action-width: 70vw;\n}\r\n")();
|
|
15771
15771
|
var _export_sfc = (sfc, props) => {
|
|
15772
15772
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -15791,11 +15791,26 @@ const _hoisted_6$8 = {
|
|
|
15791
15791
|
const _sfc_main$v = {
|
|
15792
15792
|
__name: "AuditBar",
|
|
15793
15793
|
props: {
|
|
15794
|
-
processId:
|
|
15795
|
-
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
|
|
15794
|
+
processId: {
|
|
15795
|
+
type: Number,
|
|
15796
|
+
default: 0
|
|
15797
|
+
},
|
|
15798
|
+
mouldId: {
|
|
15799
|
+
type: Number,
|
|
15800
|
+
default: 0
|
|
15801
|
+
},
|
|
15802
|
+
userId: {
|
|
15803
|
+
type: String,
|
|
15804
|
+
default: ""
|
|
15805
|
+
},
|
|
15806
|
+
form: {
|
|
15807
|
+
type: Object,
|
|
15808
|
+
default: null
|
|
15809
|
+
},
|
|
15810
|
+
process_detail: {
|
|
15811
|
+
type: Function,
|
|
15812
|
+
default: null
|
|
15813
|
+
}
|
|
15799
15814
|
},
|
|
15800
15815
|
emits: ["pass", "refuse", "apply", "auth"],
|
|
15801
15816
|
setup(__props, {
|
|
@@ -15856,7 +15871,13 @@ const _sfc_main$v = {
|
|
|
15856
15871
|
const params = {
|
|
15857
15872
|
id: props.processId
|
|
15858
15873
|
};
|
|
15874
|
+
if (!util.process_detail)
|
|
15875
|
+
return;
|
|
15859
15876
|
const res = yield util.process_detail(params);
|
|
15877
|
+
if (res.code != 200)
|
|
15878
|
+
return;
|
|
15879
|
+
if (params.processId != props.processId)
|
|
15880
|
+
return;
|
|
15860
15881
|
data2.process = res.data;
|
|
15861
15882
|
});
|
|
15862
15883
|
const queryStepAuth = () => __async(this, null, function* () {
|
|
@@ -15869,7 +15890,18 @@ const _sfc_main$v = {
|
|
|
15869
15890
|
form: props.form
|
|
15870
15891
|
};
|
|
15871
15892
|
const res = yield util.process_step_auth(params);
|
|
15893
|
+
if (res.code != 200)
|
|
15894
|
+
return;
|
|
15895
|
+
if (params.processId != props.processId)
|
|
15896
|
+
return;
|
|
15897
|
+
if (params.mouldId != props.mouldId)
|
|
15898
|
+
return;
|
|
15899
|
+
if (params.userId != props.userId)
|
|
15900
|
+
return;
|
|
15901
|
+
if (params.form != props.form && !params.form && props.form)
|
|
15902
|
+
return;
|
|
15872
15903
|
data2.stepAuth = res.data;
|
|
15904
|
+
updateAuth();
|
|
15873
15905
|
});
|
|
15874
15906
|
const updateAuth = () => {
|
|
15875
15907
|
let res = {};
|
|
@@ -15908,11 +15940,20 @@ const _sfc_main$v = {
|
|
|
15908
15940
|
data2.canApply = false;
|
|
15909
15941
|
return;
|
|
15910
15942
|
}
|
|
15911
|
-
let
|
|
15943
|
+
let params = {
|
|
15912
15944
|
mouldId: props.mouldId,
|
|
15913
15945
|
userId: props.userId,
|
|
15914
15946
|
form: props.form
|
|
15915
|
-
}
|
|
15947
|
+
};
|
|
15948
|
+
let res = yield util.process_can_apply(params);
|
|
15949
|
+
if (res.code != 200)
|
|
15950
|
+
return;
|
|
15951
|
+
if (params.mouldId != props.mouldId)
|
|
15952
|
+
return;
|
|
15953
|
+
if (params.userId != props.userId)
|
|
15954
|
+
return;
|
|
15955
|
+
if (params.form != props.form && !params.form && props.form)
|
|
15956
|
+
return;
|
|
15916
15957
|
data2.canApply = res.data;
|
|
15917
15958
|
});
|
|
15918
15959
|
const formatTitle = (task) => {
|
|
@@ -15978,43 +16019,36 @@ const _sfc_main$v = {
|
|
|
15978
16019
|
return "\u5BA1\u6279\u6D41\u7A0B:";
|
|
15979
16020
|
}
|
|
15980
16021
|
});
|
|
16022
|
+
const refresh = () => __async(this, null, function* () {
|
|
16023
|
+
yield queryDetail();
|
|
16024
|
+
queryStepAuth();
|
|
16025
|
+
updateCanApply();
|
|
16026
|
+
});
|
|
15981
16027
|
watch(() => props.userId, () => __async(this, null, function* () {
|
|
15982
16028
|
if (!props.userId)
|
|
15983
16029
|
return;
|
|
15984
|
-
yield
|
|
15985
|
-
yield queryStepAuth();
|
|
15986
|
-
yield updateCanApply();
|
|
16030
|
+
yield refresh();
|
|
15987
16031
|
}), {
|
|
15988
16032
|
immediate: true
|
|
15989
16033
|
});
|
|
15990
16034
|
watch(() => props.processId, () => __async(this, null, function* () {
|
|
15991
|
-
yield
|
|
15992
|
-
yield queryStepAuth();
|
|
15993
|
-
yield updateCanApply();
|
|
16035
|
+
yield refresh();
|
|
15994
16036
|
}), {
|
|
15995
16037
|
immediate: true
|
|
15996
16038
|
});
|
|
15997
16039
|
watch(() => props.mouldId, () => __async(this, null, function* () {
|
|
15998
16040
|
if (!props.processId && !props.mouldId)
|
|
15999
16041
|
return;
|
|
16000
|
-
yield
|
|
16001
|
-
yield queryStepAuth();
|
|
16002
|
-
yield updateAuth();
|
|
16003
|
-
yield updateCanApply();
|
|
16042
|
+
yield refresh();
|
|
16004
16043
|
}), {
|
|
16005
16044
|
immediate: true
|
|
16006
16045
|
});
|
|
16007
16046
|
watch(() => JSON.stringify(props.form), () => __async(this, null, function* () {
|
|
16008
16047
|
if (!data2.stepAuth)
|
|
16009
16048
|
return;
|
|
16010
|
-
yield
|
|
16011
|
-
yield queryStepAuth();
|
|
16012
|
-
yield updateAuth();
|
|
16013
|
-
yield updateCanApply();
|
|
16049
|
+
yield refresh();
|
|
16014
16050
|
}), {
|
|
16015
16051
|
immediate: true
|
|
16016
|
-
}, {
|
|
16017
|
-
deep: true
|
|
16018
16052
|
});
|
|
16019
16053
|
return (_ctx, _cache) => {
|
|
16020
16054
|
const _component_van_field = resolveComponent("van-field");
|
|
@@ -16091,7 +16125,7 @@ const _sfc_main$v = {
|
|
|
16091
16125
|
};
|
|
16092
16126
|
}
|
|
16093
16127
|
};
|
|
16094
|
-
var AuditBar = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-
|
|
16128
|
+
var AuditBar = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-47d3612b"]]);
|
|
16095
16129
|
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
16096
16130
|
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
16097
16131
|
const isDef = (val) => typeof val !== "undefined";
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -15769,7 +15769,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15769
15769
|
}).call(commonjsGlobal);
|
|
15770
15770
|
})(lodash$1, lodash$1.exports);
|
|
15771
15771
|
var lodash = lodash$1.exports;
|
|
15772
|
-
var AuditBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-
|
|
15772
|
+
var AuditBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-47d3612b] {\n text-align: center;\n padding: 15px 15px;\n}\n.memo[data-v-47d3612b] {\n margin-bottom: 15px;\n}\n.refuse-btn[data-v-47d3612b] {\n width: 120px;\n margin-right: 15px;\n}\n.pass-btn[data-v-47d3612b] {\n width: 120px;\n}\n.apply-btn[data-v-47d3612b] {\n width: 60vw;\n}\n.task-list[data-v-47d3612b] {\n margin-top: 15px;\n}\n.task-title[data-v-47d3612b] {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n text-align: left;\n}\n.task-user[data-v-47d3612b] {\n font-size: 13px;\n color: #666;\n text-align: left;\n margin-top: 5px;\n}\n.audit-title[data-v-47d3612b] {\n padding: 25px 15px 0 15px;\n font-size: 16px;\n font-weight: bold;\n color: #666;\n text-align: left;\n}")();
|
|
15773
15773
|
var AuditBar_vue_vue_type_style_index_1_lang = /* @__PURE__ */ (() => "\n:root:root {\r\n --van-popover-action-width: 70vw;\n}\r\n")();
|
|
15774
15774
|
var _export_sfc = (sfc, props) => {
|
|
15775
15775
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -15794,11 +15794,26 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15794
15794
|
const _sfc_main$v = {
|
|
15795
15795
|
__name: "AuditBar",
|
|
15796
15796
|
props: {
|
|
15797
|
-
processId:
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15797
|
+
processId: {
|
|
15798
|
+
type: Number,
|
|
15799
|
+
default: 0
|
|
15800
|
+
},
|
|
15801
|
+
mouldId: {
|
|
15802
|
+
type: Number,
|
|
15803
|
+
default: 0
|
|
15804
|
+
},
|
|
15805
|
+
userId: {
|
|
15806
|
+
type: String,
|
|
15807
|
+
default: ""
|
|
15808
|
+
},
|
|
15809
|
+
form: {
|
|
15810
|
+
type: Object,
|
|
15811
|
+
default: null
|
|
15812
|
+
},
|
|
15813
|
+
process_detail: {
|
|
15814
|
+
type: Function,
|
|
15815
|
+
default: null
|
|
15816
|
+
}
|
|
15802
15817
|
},
|
|
15803
15818
|
emits: ["pass", "refuse", "apply", "auth"],
|
|
15804
15819
|
setup(__props, {
|
|
@@ -15859,7 +15874,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15859
15874
|
const params = {
|
|
15860
15875
|
id: props.processId
|
|
15861
15876
|
};
|
|
15877
|
+
if (!util.process_detail)
|
|
15878
|
+
return;
|
|
15862
15879
|
const res = yield util.process_detail(params);
|
|
15880
|
+
if (res.code != 200)
|
|
15881
|
+
return;
|
|
15882
|
+
if (params.processId != props.processId)
|
|
15883
|
+
return;
|
|
15863
15884
|
data2.process = res.data;
|
|
15864
15885
|
});
|
|
15865
15886
|
const queryStepAuth = () => __async(this, null, function* () {
|
|
@@ -15872,7 +15893,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15872
15893
|
form: props.form
|
|
15873
15894
|
};
|
|
15874
15895
|
const res = yield util.process_step_auth(params);
|
|
15896
|
+
if (res.code != 200)
|
|
15897
|
+
return;
|
|
15898
|
+
if (params.processId != props.processId)
|
|
15899
|
+
return;
|
|
15900
|
+
if (params.mouldId != props.mouldId)
|
|
15901
|
+
return;
|
|
15902
|
+
if (params.userId != props.userId)
|
|
15903
|
+
return;
|
|
15904
|
+
if (params.form != props.form && !params.form && props.form)
|
|
15905
|
+
return;
|
|
15875
15906
|
data2.stepAuth = res.data;
|
|
15907
|
+
updateAuth();
|
|
15876
15908
|
});
|
|
15877
15909
|
const updateAuth = () => {
|
|
15878
15910
|
let res = {};
|
|
@@ -15911,11 +15943,20 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15911
15943
|
data2.canApply = false;
|
|
15912
15944
|
return;
|
|
15913
15945
|
}
|
|
15914
|
-
let
|
|
15946
|
+
let params = {
|
|
15915
15947
|
mouldId: props.mouldId,
|
|
15916
15948
|
userId: props.userId,
|
|
15917
15949
|
form: props.form
|
|
15918
|
-
}
|
|
15950
|
+
};
|
|
15951
|
+
let res = yield util.process_can_apply(params);
|
|
15952
|
+
if (res.code != 200)
|
|
15953
|
+
return;
|
|
15954
|
+
if (params.mouldId != props.mouldId)
|
|
15955
|
+
return;
|
|
15956
|
+
if (params.userId != props.userId)
|
|
15957
|
+
return;
|
|
15958
|
+
if (params.form != props.form && !params.form && props.form)
|
|
15959
|
+
return;
|
|
15919
15960
|
data2.canApply = res.data;
|
|
15920
15961
|
});
|
|
15921
15962
|
const formatTitle = (task) => {
|
|
@@ -15981,43 +16022,36 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15981
16022
|
return "\u5BA1\u6279\u6D41\u7A0B:";
|
|
15982
16023
|
}
|
|
15983
16024
|
});
|
|
16025
|
+
const refresh = () => __async(this, null, function* () {
|
|
16026
|
+
yield queryDetail();
|
|
16027
|
+
queryStepAuth();
|
|
16028
|
+
updateCanApply();
|
|
16029
|
+
});
|
|
15984
16030
|
vue.watch(() => props.userId, () => __async(this, null, function* () {
|
|
15985
16031
|
if (!props.userId)
|
|
15986
16032
|
return;
|
|
15987
|
-
yield
|
|
15988
|
-
yield queryStepAuth();
|
|
15989
|
-
yield updateCanApply();
|
|
16033
|
+
yield refresh();
|
|
15990
16034
|
}), {
|
|
15991
16035
|
immediate: true
|
|
15992
16036
|
});
|
|
15993
16037
|
vue.watch(() => props.processId, () => __async(this, null, function* () {
|
|
15994
|
-
yield
|
|
15995
|
-
yield queryStepAuth();
|
|
15996
|
-
yield updateCanApply();
|
|
16038
|
+
yield refresh();
|
|
15997
16039
|
}), {
|
|
15998
16040
|
immediate: true
|
|
15999
16041
|
});
|
|
16000
16042
|
vue.watch(() => props.mouldId, () => __async(this, null, function* () {
|
|
16001
16043
|
if (!props.processId && !props.mouldId)
|
|
16002
16044
|
return;
|
|
16003
|
-
yield
|
|
16004
|
-
yield queryStepAuth();
|
|
16005
|
-
yield updateAuth();
|
|
16006
|
-
yield updateCanApply();
|
|
16045
|
+
yield refresh();
|
|
16007
16046
|
}), {
|
|
16008
16047
|
immediate: true
|
|
16009
16048
|
});
|
|
16010
16049
|
vue.watch(() => JSON.stringify(props.form), () => __async(this, null, function* () {
|
|
16011
16050
|
if (!data2.stepAuth)
|
|
16012
16051
|
return;
|
|
16013
|
-
yield
|
|
16014
|
-
yield queryStepAuth();
|
|
16015
|
-
yield updateAuth();
|
|
16016
|
-
yield updateCanApply();
|
|
16052
|
+
yield refresh();
|
|
16017
16053
|
}), {
|
|
16018
16054
|
immediate: true
|
|
16019
|
-
}, {
|
|
16020
|
-
deep: true
|
|
16021
16055
|
});
|
|
16022
16056
|
return (_ctx, _cache) => {
|
|
16023
16057
|
const _component_van_field = vue.resolveComponent("van-field");
|
|
@@ -16094,7 +16128,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
16094
16128
|
};
|
|
16095
16129
|
}
|
|
16096
16130
|
};
|
|
16097
|
-
var AuditBar = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-
|
|
16131
|
+
var AuditBar = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-47d3612b"]]);
|
|
16098
16132
|
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
16099
16133
|
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
16100
16134
|
const isDef = (val) => typeof val !== "undefined";
|
package/package.json
CHANGED
|
@@ -34,11 +34,26 @@ import util from '../util'
|
|
|
34
34
|
import lodash from 'lodash'
|
|
35
35
|
|
|
36
36
|
const props = defineProps({
|
|
37
|
-
processId:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
processId: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 0
|
|
40
|
+
},
|
|
41
|
+
mouldId: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 0
|
|
44
|
+
},
|
|
45
|
+
userId: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ''
|
|
48
|
+
},
|
|
49
|
+
form: {
|
|
50
|
+
type: Object,
|
|
51
|
+
default: null
|
|
52
|
+
},
|
|
53
|
+
process_detail: {
|
|
54
|
+
type: Function,
|
|
55
|
+
default: null
|
|
56
|
+
}
|
|
42
57
|
})
|
|
43
58
|
const emit = defineEmits(['pass', 'refuse', 'apply', 'auth'])
|
|
44
59
|
const data = reactive({
|
|
@@ -106,7 +121,19 @@ const queryDetail = async () => {
|
|
|
106
121
|
const params = {
|
|
107
122
|
id: props.processId
|
|
108
123
|
}
|
|
124
|
+
|
|
125
|
+
if (!util.process_detail)
|
|
126
|
+
return
|
|
127
|
+
|
|
109
128
|
const res = await util.process_detail(params)
|
|
129
|
+
if (res.code != 200)
|
|
130
|
+
return
|
|
131
|
+
|
|
132
|
+
//防止网络请求先发后返回
|
|
133
|
+
//参数变化时,扔掉返回
|
|
134
|
+
if (params.processId != props.processId)
|
|
135
|
+
return
|
|
136
|
+
|
|
110
137
|
data.process = res.data
|
|
111
138
|
}
|
|
112
139
|
|
|
@@ -121,7 +148,26 @@ const queryStepAuth = async () => {
|
|
|
121
148
|
form: props.form
|
|
122
149
|
}
|
|
123
150
|
const res = await util.process_step_auth(params)
|
|
151
|
+
if (res.code != 200)
|
|
152
|
+
return
|
|
153
|
+
|
|
154
|
+
//防止网络请求先发后返回
|
|
155
|
+
//参数变化时,扔掉返回
|
|
156
|
+
if (params.processId != props.processId)
|
|
157
|
+
return
|
|
158
|
+
|
|
159
|
+
if (params.mouldId != props.mouldId)
|
|
160
|
+
return
|
|
161
|
+
|
|
162
|
+
if (params.userId != props.userId)
|
|
163
|
+
return
|
|
164
|
+
|
|
165
|
+
if (params.form != props.form && !params.form && props.form)
|
|
166
|
+
return
|
|
167
|
+
|
|
124
168
|
data.stepAuth = res.data
|
|
169
|
+
|
|
170
|
+
updateAuth()
|
|
125
171
|
}
|
|
126
172
|
|
|
127
173
|
const updateAuth = () => {
|
|
@@ -168,16 +214,30 @@ const getAuth = (fieldAuth) => {
|
|
|
168
214
|
}
|
|
169
215
|
|
|
170
216
|
const updateCanApply = async () => {
|
|
171
|
-
if (props.processId){
|
|
217
|
+
if (props.processId) {
|
|
172
218
|
data.canApply = false
|
|
173
219
|
return
|
|
174
220
|
}
|
|
175
221
|
|
|
176
|
-
let
|
|
222
|
+
let params = {
|
|
177
223
|
mouldId: props.mouldId,
|
|
178
224
|
userId: props.userId,
|
|
179
225
|
form: props.form
|
|
180
|
-
}
|
|
226
|
+
}
|
|
227
|
+
let res = await util.process_can_apply(params)
|
|
228
|
+
if (res.code != 200)
|
|
229
|
+
return
|
|
230
|
+
|
|
231
|
+
//防止网络请求先发后返回
|
|
232
|
+
//参数变化时,扔掉返回
|
|
233
|
+
if (params.mouldId != props.mouldId)
|
|
234
|
+
return
|
|
235
|
+
|
|
236
|
+
if (params.userId != props.userId)
|
|
237
|
+
return
|
|
238
|
+
|
|
239
|
+
if (params.form != props.form && !params.form && props.form)
|
|
240
|
+
return
|
|
181
241
|
|
|
182
242
|
data.canApply = res.data
|
|
183
243
|
}
|
|
@@ -250,42 +310,35 @@ const formatProcessTitle = computed(() => {
|
|
|
250
310
|
}
|
|
251
311
|
})
|
|
252
312
|
|
|
253
|
-
|
|
313
|
+
const refresh = async() => {
|
|
314
|
+
await queryDetail()
|
|
315
|
+
queryStepAuth()
|
|
316
|
+
updateCanApply()
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
watch(() => props.userId, async () => {
|
|
254
320
|
if (!props.userId)
|
|
255
321
|
return
|
|
256
322
|
|
|
257
|
-
await
|
|
258
|
-
await queryStepAuth()
|
|
259
|
-
await updateCanApply()
|
|
323
|
+
await refresh()
|
|
260
324
|
}, { immediate: true })
|
|
261
325
|
|
|
262
|
-
watch(() => props.processId, async() => {
|
|
263
|
-
await
|
|
264
|
-
await queryStepAuth()
|
|
265
|
-
await updateCanApply()
|
|
326
|
+
watch(() => props.processId, async () => {
|
|
327
|
+
await refresh()
|
|
266
328
|
}, { immediate: true })
|
|
267
329
|
|
|
268
330
|
watch(() => props.mouldId, async () => {
|
|
269
331
|
if (!props.processId && !props.mouldId)
|
|
270
332
|
return
|
|
271
|
-
|
|
272
|
-
await queryDetail()
|
|
273
|
-
await queryStepAuth()
|
|
274
|
-
await updateAuth()
|
|
275
|
-
await updateCanApply()
|
|
333
|
+
await refresh()
|
|
276
334
|
}, { immediate: true })
|
|
277
335
|
|
|
278
336
|
watch(() => JSON.stringify(props.form), async () => {
|
|
279
337
|
if (!data.stepAuth)
|
|
280
338
|
return
|
|
281
339
|
|
|
282
|
-
await
|
|
283
|
-
|
|
284
|
-
await updateAuth()
|
|
285
|
-
await updateCanApply()
|
|
286
|
-
}, { immediate: true }, {
|
|
287
|
-
deep: true
|
|
288
|
-
})
|
|
340
|
+
await refresh()
|
|
341
|
+
}, { immediate: true })
|
|
289
342
|
</script>
|
|
290
343
|
|
|
291
344
|
<style lang="scss" scoped>
|