widget.qw 1.0.51 → 1.0.53

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 CHANGED
@@ -1,36 +1,36 @@
1
- @charset "UTF-8";.widget[data-v-3cac72de] {
1
+ @charset "UTF-8";.widget[data-v-aec89184] {
2
2
  text-align: center;
3
3
  padding: 15px 15px;
4
4
  }
5
- .memo[data-v-3cac72de] {
5
+ .memo[data-v-aec89184] {
6
6
  margin-bottom: 15px;
7
7
  }
8
- .refuse-btn[data-v-3cac72de] {
8
+ .refuse-btn[data-v-aec89184] {
9
9
  width: 120px;
10
10
  margin-right: 15px;
11
11
  }
12
- .pass-btn[data-v-3cac72de] {
12
+ .pass-btn[data-v-aec89184] {
13
13
  width: 120px;
14
14
  }
15
- .apply-btn[data-v-3cac72de] {
15
+ .apply-btn[data-v-aec89184] {
16
16
  width: 60vw;
17
17
  }
18
- .task-list[data-v-3cac72de] {
18
+ .task-list[data-v-aec89184] {
19
19
  margin-top: 15px;
20
20
  }
21
- .task-title[data-v-3cac72de] {
21
+ .task-title[data-v-aec89184] {
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-3cac72de] {
27
+ .task-user[data-v-aec89184] {
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-3cac72de] {
33
+ .audit-title[data-v-aec89184] {
34
34
  padding: 25px 15px 0 15px;
35
35
  font-size: 16px;
36
36
  font-weight: bold;
@@ -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-3cac72de] {\n text-align: center;\n padding: 15px 15px;\n}\n.memo[data-v-3cac72de] {\n margin-bottom: 15px;\n}\n.refuse-btn[data-v-3cac72de] {\n width: 120px;\n margin-right: 15px;\n}\n.pass-btn[data-v-3cac72de] {\n width: 120px;\n}\n.apply-btn[data-v-3cac72de] {\n width: 60vw;\n}\n.task-list[data-v-3cac72de] {\n margin-top: 15px;\n}\n.task-title[data-v-3cac72de] {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n text-align: left;\n}\n.task-user[data-v-3cac72de] {\n font-size: 13px;\n color: #666;\n text-align: left;\n margin-top: 5px;\n}\n.audit-title[data-v-3cac72de] {\n padding: 25px 15px 0 15px;\n font-size: 16px;\n font-weight: bold;\n color: #666;\n text-align: left;\n}")();
15769
+ var AuditBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-aec89184] {\n text-align: center;\n padding: 15px 15px;\n}\n.memo[data-v-aec89184] {\n margin-bottom: 15px;\n}\n.refuse-btn[data-v-aec89184] {\n width: 120px;\n margin-right: 15px;\n}\n.pass-btn[data-v-aec89184] {\n width: 120px;\n}\n.apply-btn[data-v-aec89184] {\n width: 60vw;\n}\n.task-list[data-v-aec89184] {\n margin-top: 15px;\n}\n.task-title[data-v-aec89184] {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n text-align: left;\n}\n.task-user[data-v-aec89184] {\n font-size: 13px;\n color: #666;\n text-align: left;\n margin-top: 5px;\n}\n.audit-title[data-v-aec89184] {\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;
@@ -15876,6 +15876,8 @@ const _sfc_main$v = {
15876
15876
  const res = yield util.process_detail(params);
15877
15877
  if (res.code != 200)
15878
15878
  return;
15879
+ if (params.processId != props.processId && props.processId && !params.processId)
15880
+ return;
15879
15881
  data2.process = res.data;
15880
15882
  });
15881
15883
  const queryStepAuth = () => __async(this, null, function* () {
@@ -15890,15 +15892,16 @@ const _sfc_main$v = {
15890
15892
  const res = yield util.process_step_auth(params);
15891
15893
  if (res.code != 200)
15892
15894
  return;
15893
- if (params.processId != props.processId && !params.processId && props.processId)
15895
+ if (params.processId != props.processId && props.processId && !params.processId)
15894
15896
  return;
15895
- if (params.mouldId != props.mouldId && !params.mouldId && props.mouldId)
15897
+ if (params.mouldId != props.mouldId && props.mouldId && !params.mouldId)
15896
15898
  return;
15897
- if (params.userId != props.userId && !params.userId && props.userId)
15899
+ if (params.userId != props.userId && props.user && !params.userId)
15898
15900
  return;
15899
15901
  if (params.form != props.form && !params.form && props.form)
15900
15902
  return;
15901
15903
  data2.stepAuth = res.data;
15904
+ updateAuth();
15902
15905
  });
15903
15906
  const updateAuth = () => {
15904
15907
  let res = {};
@@ -15945,9 +15948,9 @@ const _sfc_main$v = {
15945
15948
  let res = yield util.process_can_apply(params);
15946
15949
  if (res.code != 200)
15947
15950
  return;
15948
- if (params.mouldId != props.mouldId && !params.mouldId && props.mouldId)
15951
+ if (params.mouldId != props.mouldId)
15949
15952
  return;
15950
- if (params.userId != props.userId && !params.userId && props.userId)
15953
+ if (params.userId != props.userId)
15951
15954
  return;
15952
15955
  if (params.form != props.form && !params.form && props.form)
15953
15956
  return;
@@ -16016,39 +16019,34 @@ const _sfc_main$v = {
16016
16019
  return "\u5BA1\u6279\u6D41\u7A0B:";
16017
16020
  }
16018
16021
  });
16022
+ const refresh = () => __async(this, null, function* () {
16023
+ yield queryDetail();
16024
+ queryStepAuth();
16025
+ updateCanApply();
16026
+ });
16019
16027
  watch(() => props.userId, () => __async(this, null, function* () {
16020
16028
  if (!props.userId)
16021
16029
  return;
16022
- yield queryDetail();
16023
- yield queryStepAuth();
16024
- yield updateCanApply();
16030
+ yield refresh();
16025
16031
  }), {
16026
16032
  immediate: true
16027
16033
  });
16028
16034
  watch(() => props.processId, () => __async(this, null, function* () {
16029
- yield queryDetail();
16030
- yield queryStepAuth();
16031
- yield updateCanApply();
16035
+ yield refresh();
16032
16036
  }), {
16033
16037
  immediate: true
16034
16038
  });
16035
16039
  watch(() => props.mouldId, () => __async(this, null, function* () {
16036
16040
  if (!props.processId && !props.mouldId)
16037
16041
  return;
16038
- yield queryDetail();
16039
- yield queryStepAuth();
16040
- yield updateAuth();
16041
- yield updateCanApply();
16042
+ yield refresh();
16042
16043
  }), {
16043
16044
  immediate: true
16044
16045
  });
16045
16046
  watch(() => JSON.stringify(props.form), () => __async(this, null, function* () {
16046
16047
  if (!data2.stepAuth)
16047
16048
  return;
16048
- yield queryDetail();
16049
- yield queryStepAuth();
16050
- yield updateAuth();
16051
- yield updateCanApply();
16049
+ yield refresh();
16052
16050
  }), {
16053
16051
  immediate: true
16054
16052
  });
@@ -16127,7 +16125,7 @@ const _sfc_main$v = {
16127
16125
  };
16128
16126
  }
16129
16127
  };
16130
- var AuditBar = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-3cac72de"]]);
16128
+ var AuditBar = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-aec89184"]]);
16131
16129
  const isClient = typeof window !== "undefined" && typeof document !== "undefined";
16132
16130
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
16133
16131
  const isDef = (val) => typeof val !== "undefined";
@@ -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-3cac72de] {\n text-align: center;\n padding: 15px 15px;\n}\n.memo[data-v-3cac72de] {\n margin-bottom: 15px;\n}\n.refuse-btn[data-v-3cac72de] {\n width: 120px;\n margin-right: 15px;\n}\n.pass-btn[data-v-3cac72de] {\n width: 120px;\n}\n.apply-btn[data-v-3cac72de] {\n width: 60vw;\n}\n.task-list[data-v-3cac72de] {\n margin-top: 15px;\n}\n.task-title[data-v-3cac72de] {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n text-align: left;\n}\n.task-user[data-v-3cac72de] {\n font-size: 13px;\n color: #666;\n text-align: left;\n margin-top: 5px;\n}\n.audit-title[data-v-3cac72de] {\n padding: 25px 15px 0 15px;\n font-size: 16px;\n font-weight: bold;\n color: #666;\n text-align: left;\n}")();
15772
+ var AuditBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-aec89184] {\n text-align: center;\n padding: 15px 15px;\n}\n.memo[data-v-aec89184] {\n margin-bottom: 15px;\n}\n.refuse-btn[data-v-aec89184] {\n width: 120px;\n margin-right: 15px;\n}\n.pass-btn[data-v-aec89184] {\n width: 120px;\n}\n.apply-btn[data-v-aec89184] {\n width: 60vw;\n}\n.task-list[data-v-aec89184] {\n margin-top: 15px;\n}\n.task-title[data-v-aec89184] {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n text-align: left;\n}\n.task-user[data-v-aec89184] {\n font-size: 13px;\n color: #666;\n text-align: left;\n margin-top: 5px;\n}\n.audit-title[data-v-aec89184] {\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;
@@ -15879,6 +15879,8 @@ var __async = (__this, __arguments, generator) => {
15879
15879
  const res = yield util.process_detail(params);
15880
15880
  if (res.code != 200)
15881
15881
  return;
15882
+ if (params.processId != props.processId && props.processId && !params.processId)
15883
+ return;
15882
15884
  data2.process = res.data;
15883
15885
  });
15884
15886
  const queryStepAuth = () => __async(this, null, function* () {
@@ -15893,15 +15895,16 @@ var __async = (__this, __arguments, generator) => {
15893
15895
  const res = yield util.process_step_auth(params);
15894
15896
  if (res.code != 200)
15895
15897
  return;
15896
- if (params.processId != props.processId && !params.processId && props.processId)
15898
+ if (params.processId != props.processId && props.processId && !params.processId)
15897
15899
  return;
15898
- if (params.mouldId != props.mouldId && !params.mouldId && props.mouldId)
15900
+ if (params.mouldId != props.mouldId && props.mouldId && !params.mouldId)
15899
15901
  return;
15900
- if (params.userId != props.userId && !params.userId && props.userId)
15902
+ if (params.userId != props.userId && props.user && !params.userId)
15901
15903
  return;
15902
15904
  if (params.form != props.form && !params.form && props.form)
15903
15905
  return;
15904
15906
  data2.stepAuth = res.data;
15907
+ updateAuth();
15905
15908
  });
15906
15909
  const updateAuth = () => {
15907
15910
  let res = {};
@@ -15948,9 +15951,9 @@ var __async = (__this, __arguments, generator) => {
15948
15951
  let res = yield util.process_can_apply(params);
15949
15952
  if (res.code != 200)
15950
15953
  return;
15951
- if (params.mouldId != props.mouldId && !params.mouldId && props.mouldId)
15954
+ if (params.mouldId != props.mouldId)
15952
15955
  return;
15953
- if (params.userId != props.userId && !params.userId && props.userId)
15956
+ if (params.userId != props.userId)
15954
15957
  return;
15955
15958
  if (params.form != props.form && !params.form && props.form)
15956
15959
  return;
@@ -16019,39 +16022,34 @@ var __async = (__this, __arguments, generator) => {
16019
16022
  return "\u5BA1\u6279\u6D41\u7A0B:";
16020
16023
  }
16021
16024
  });
16025
+ const refresh = () => __async(this, null, function* () {
16026
+ yield queryDetail();
16027
+ queryStepAuth();
16028
+ updateCanApply();
16029
+ });
16022
16030
  vue.watch(() => props.userId, () => __async(this, null, function* () {
16023
16031
  if (!props.userId)
16024
16032
  return;
16025
- yield queryDetail();
16026
- yield queryStepAuth();
16027
- yield updateCanApply();
16033
+ yield refresh();
16028
16034
  }), {
16029
16035
  immediate: true
16030
16036
  });
16031
16037
  vue.watch(() => props.processId, () => __async(this, null, function* () {
16032
- yield queryDetail();
16033
- yield queryStepAuth();
16034
- yield updateCanApply();
16038
+ yield refresh();
16035
16039
  }), {
16036
16040
  immediate: true
16037
16041
  });
16038
16042
  vue.watch(() => props.mouldId, () => __async(this, null, function* () {
16039
16043
  if (!props.processId && !props.mouldId)
16040
16044
  return;
16041
- yield queryDetail();
16042
- yield queryStepAuth();
16043
- yield updateAuth();
16044
- yield updateCanApply();
16045
+ yield refresh();
16045
16046
  }), {
16046
16047
  immediate: true
16047
16048
  });
16048
16049
  vue.watch(() => JSON.stringify(props.form), () => __async(this, null, function* () {
16049
16050
  if (!data2.stepAuth)
16050
16051
  return;
16051
- yield queryDetail();
16052
- yield queryStepAuth();
16053
- yield updateAuth();
16054
- yield updateCanApply();
16052
+ yield refresh();
16055
16053
  }), {
16056
16054
  immediate: true
16057
16055
  });
@@ -16130,7 +16128,7 @@ var __async = (__this, __arguments, generator) => {
16130
16128
  };
16131
16129
  }
16132
16130
  };
16133
- var AuditBar = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-3cac72de"]]);
16131
+ var AuditBar = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-aec89184"]]);
16134
16132
  const isClient = typeof window !== "undefined" && typeof document !== "undefined";
16135
16133
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
16136
16134
  const isDef = (val) => typeof val !== "undefined";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "widget.qw",
3
3
  "private": false,
4
- "version": "1.0.51",
4
+ "version": "1.0.53",
5
5
  "description": "marqstree Vue3组件库",
6
6
  "main": "build/widget.qw.es.js",
7
7
  "keywords": [
@@ -35,24 +35,24 @@ import lodash from 'lodash'
35
35
 
36
36
  const props = defineProps({
37
37
  processId: {
38
- type:Number,
39
- default:0
38
+ type: Number,
39
+ default: 0
40
40
  },
41
41
  mouldId: {
42
- type:Number,
43
- default:0
42
+ type: Number,
43
+ default: 0
44
44
  },
45
45
  userId: {
46
- type:String,
47
- default:''
46
+ type: String,
47
+ default: ''
48
48
  },
49
49
  form: {
50
- type:Object,
51
- default:null
50
+ type: Object,
51
+ default: null
52
52
  },
53
53
  process_detail: {
54
- type:Function,
55
- default:null
54
+ type: Function,
55
+ default: null
56
56
  }
57
57
  })
58
58
  const emit = defineEmits(['pass', 'refuse', 'apply', 'auth'])
@@ -122,12 +122,18 @@ const queryDetail = async () => {
122
122
  id: props.processId
123
123
  }
124
124
 
125
- if(!util.process_detail)
125
+ if (!util.process_detail)
126
126
  return
127
127
 
128
128
  const res = await util.process_detail(params)
129
- if(res.code!=200)
129
+ if (res.code != 200)
130
130
  return
131
+
132
+ //防止网络请求先发后返回
133
+ //参数变化时,扔掉返回
134
+ if (params.processId != props.processId && props.processId && !params.processId)
135
+ return
136
+
131
137
  data.process = res.data
132
138
  }
133
139
 
@@ -142,22 +148,26 @@ const queryStepAuth = async () => {
142
148
  form: props.form
143
149
  }
144
150
  const res = await util.process_step_auth(params)
145
- if(res.code!=200)
151
+ if (res.code != 200)
146
152
  return
147
153
 
148
- if(params.processId!=props.processId && !params.processId && props.processId)
154
+ //防止网络请求先发后返回
155
+ //参数变化时,扔掉返回
156
+ if (params.processId != props.processId && props.processId && !params.processId)
149
157
  return
150
158
 
151
- if(params.mouldId!=props.mouldId && !params.mouldId && props.mouldId)
159
+ if (params.mouldId != props.mouldId && props.mouldId && !params.mouldId)
152
160
  return
153
161
 
154
- if(params.userId!=props.userId && !params.userId && props.userId)
162
+ if (params.userId != props.userId && props.user && !params.userId)
155
163
  return
156
164
 
157
- if(params.form!=props.form && !params.form && props.form)
165
+ if (params.form != props.form && !params.form && props.form)
158
166
  return
159
167
 
160
168
  data.stepAuth = res.data
169
+
170
+ updateAuth()
161
171
  }
162
172
 
163
173
  const updateAuth = () => {
@@ -204,7 +214,7 @@ const getAuth = (fieldAuth) => {
204
214
  }
205
215
 
206
216
  const updateCanApply = async () => {
207
- if (props.processId){
217
+ if (props.processId) {
208
218
  data.canApply = false
209
219
  return
210
220
  }
@@ -215,16 +225,18 @@ const updateCanApply = async () => {
215
225
  form: props.form
216
226
  }
217
227
  let res = await util.process_can_apply(params)
218
- if(res.code!=200)
228
+ if (res.code != 200)
219
229
  return
220
230
 
221
- if(params.mouldId!=props.mouldId && !params.mouldId && props.mouldId)
231
+ //防止网络请求先发后返回
232
+ //参数变化时,扔掉返回
233
+ if (params.mouldId != props.mouldId)
222
234
  return
223
235
 
224
- if(params.userId!=props.userId && !params.userId && props.userId)
236
+ if (params.userId != props.userId)
225
237
  return
226
238
 
227
- if(params.form!=props.form && !params.form && props.form)
239
+ if (params.form != props.form && !params.form && props.form)
228
240
  return
229
241
 
230
242
  data.canApply = res.data
@@ -298,39 +310,34 @@ const formatProcessTitle = computed(() => {
298
310
  }
299
311
  })
300
312
 
301
- watch(() => props.userId, async() => {
313
+ const refresh = async() => {
314
+ await queryDetail()
315
+ queryStepAuth()
316
+ updateCanApply()
317
+ }
318
+
319
+ watch(() => props.userId, async () => {
302
320
  if (!props.userId)
303
321
  return
304
322
 
305
- await queryDetail()
306
- await queryStepAuth()
307
- await updateCanApply()
323
+ await refresh()
308
324
  }, { immediate: true })
309
325
 
310
- watch(() => props.processId, async() => {
311
- await queryDetail()
312
- await queryStepAuth()
313
- await updateCanApply()
326
+ watch(() => props.processId, async () => {
327
+ await refresh()
314
328
  }, { immediate: true })
315
329
 
316
330
  watch(() => props.mouldId, async () => {
317
331
  if (!props.processId && !props.mouldId)
318
332
  return
319
-
320
- await queryDetail()
321
- await queryStepAuth()
322
- await updateAuth()
323
- await updateCanApply()
333
+ await refresh()
324
334
  }, { immediate: true })
325
335
 
326
336
  watch(() => JSON.stringify(props.form), async () => {
327
337
  if (!data.stepAuth)
328
338
  return
329
339
 
330
- await queryDetail()
331
- await queryStepAuth()
332
- await updateAuth()
333
- await updateCanApply()
340
+ await refresh()
334
341
  }, { immediate: true })
335
342
  </script>
336
343