n20-common-lib 2.2.23 → 2.2.25

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": "n20-common-lib",
3
- "version": "2.2.23",
3
+ "version": "2.2.25",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -121,6 +121,10 @@ export default {
121
121
  procInstId: {
122
122
  type: String,
123
123
  default: undefined
124
+ },
125
+ hideLoading: {
126
+ type: Boolean,
127
+ default: false
124
128
  }
125
129
  },
126
130
  data() {
@@ -132,9 +136,13 @@ export default {
132
136
  created() {
133
137
  if (this.procInstId) {
134
138
  axios
135
- .get(`/bems/activiti/sample/Q003?r=${Math.random()}`, {
136
- procInstId: this.procInstId
137
- })
139
+ .get(
140
+ `/bems/activiti/sample/Q003?r=${Math.random()}`,
141
+ {
142
+ procInstId: this.procInstId
143
+ },
144
+ { loading: !this.hideLoading }
145
+ )
138
146
  .then(({ data = [] }) => {
139
147
  let approvalData = []
140
148
  data.forEach((item) => {
@@ -20,6 +20,10 @@ export default {
20
20
  procInstId: {
21
21
  type: String,
22
22
  default: ''
23
+ },
24
+ hideLoading: {
25
+ type: Boolean,
26
+ default: false
23
27
  }
24
28
  },
25
29
  data() {
@@ -34,9 +38,13 @@ export default {
34
38
  methods: {
35
39
  getSvg() {
36
40
  axios
37
- .get('/bems/activiti/sample/Q004', {
38
- procInstId: this.procInstId || this.$route.query.processInstanceId
39
- })
41
+ .get(
42
+ '/bems/activiti/sample/Q004',
43
+ {
44
+ procInstId: this.procInstId || this.$route.query.processInstanceId
45
+ },
46
+ { loading: !this.hideLoading }
47
+ )
40
48
  .then(({ data }) => {
41
49
  if (data) {
42
50
  let file = new File([data], '流程图.svg', {
@@ -53,7 +61,7 @@ export default {
53
61
  {
54
62
  procInstId: this.procInstId || this.$route.query.processInstanceId
55
63
  },
56
- { noMsg: true }
64
+ { noMsg: true, loading: !this.hideLoading }
57
65
  )
58
66
  .then((res) => {
59
67
  this.dataPro = res.data
@@ -2,7 +2,12 @@
2
2
  <div>
3
3
  <el-button plain size="mini" :disabled="false" @click="imgV = true">{{ '流程图查看' | $lc }}</el-button>
4
4
  <el-dialog :title="'查看流程' | $lc" :visible.sync="imgV" width="65%" class="p-a-0" append-to-body top="10vh">
5
- <approvalImg :proc-inst-id="procInstId" class="text-c p-a" style="height: 70vh; overflow: auto" />
5
+ <approvalImg
6
+ :proc-inst-id="procInstId"
7
+ :hide-loading="hideLoading"
8
+ class="text-c p-a"
9
+ style="height: 70vh; overflow: auto"
10
+ />
6
11
  </el-dialog>
7
12
  </div>
8
13
  </template>
@@ -18,6 +23,10 @@ export default {
18
23
  procInstId: {
19
24
  type: String,
20
25
  default: ''
26
+ },
27
+ hideLoading: {
28
+ type: Boolean,
29
+ default: false
21
30
  }
22
31
  },
23
32
  data() {
@@ -8,7 +8,6 @@
8
8
  :placeholder="phd"
9
9
  :clearable="isClearable"
10
10
  :validate-event="false"
11
- @clear="closeFn"
12
11
  @focus="focusFn"
13
12
  @input="inputFn"
14
13
  @blur="blurFn"
@@ -197,9 +196,12 @@ export default {
197
196
  let val = N(valStr)
198
197
  if (isNaN(val)) {
199
198
  this.valueStr = ''
200
- this.$emit('input', undefined)
201
- this.$emit('change', undefined)
202
- this.dispatch('ElFormItem', 'el.form.change', [undefined])
199
+ let oVal = this.value
200
+ if (oVal || oVal === 0) {
201
+ this.$emit('input', undefined)
202
+ this.$emit('change', undefined)
203
+ this.dispatch('ElFormItem', 'el.form.change', [undefined])
204
+ }
203
205
  return
204
206
  }
205
207
 
@@ -225,15 +227,13 @@ export default {
225
227
 
226
228
  this.$nextTick(() => {
227
229
  let nVar = Number(nStr)
228
- this.$emit('input', nVar)
229
- this.$emit('change', nVar)
230
-
231
- this.dispatch('ElFormItem', 'el.form.change', [nVar])
230
+ let oVal = this.value
231
+ if (oVal !== nVar) {
232
+ this.$emit('input', nVar)
233
+ this.$emit('change', nVar)
234
+ this.dispatch('ElFormItem', 'el.form.change', [nVar])
235
+ }
232
236
  })
233
- },
234
- closeFn() {
235
- this.$emit('input', undefined)
236
- this.$emit('change', undefined)
237
237
  }
238
238
  }
239
239
  }
@@ -16,7 +16,7 @@ export function setRela() {
16
16
  let _relaNos = getItem('relaNos') // sessionStorage.getItem('relaNos')
17
17
  if (_relaNos) {
18
18
  let relaNos = _relaNos
19
- relaObj = relaNos.find((r) => r.appNo === name)
19
+ relaObj = relaNos.find((r) => r.appNo === name) || { appNo: name, relaNos: [] }
20
20
  let relaNosG = getItem('relaNosGlobal')
21
21
 
22
22
  console.log({ relaObj, relaNosGlobal: relaNosG }, 'has权限列表')
@@ -30,8 +30,11 @@ export function setRela() {
30
30
  forEachs(resources, (item) => {
31
31
  relaNos.push(item.relaNo)
32
32
  })
33
- relaObj.relaNos = relaNos
34
- relaObj.relaNosGlobal = relaNos
33
+ relaObj = {
34
+ appNo: name,
35
+ relaNos: relaNos,
36
+ relaNosGlobal: relaNos
37
+ }
35
38
  }
36
39
  }
37
40