n20-common-lib 2.10.21 → 2.10.23

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.10.21",
3
+ "version": "2.10.23",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -74,6 +74,12 @@ export default {
74
74
  form: {
75
75
  type: Object,
76
76
  default: () => ({})
77
+ },
78
+ otherAttDataA: {
79
+ type: Array,
80
+ default: () => {
81
+ return []
82
+ }
77
83
  }
78
84
  },
79
85
  data() {
@@ -88,6 +94,11 @@ export default {
88
94
  },
89
95
  methods: {
90
96
  getData() {
97
+ if (this.otherAttDataA.length) {
98
+ this.otherAttData = this.otherAttDataA
99
+ return
100
+ }
101
+ if (!this.taskId) return
91
102
  axios.post(`/bems/admin/customization/${this.taskId}`, null, { loading: false }).then(({ data }) => {
92
103
  if (data && data.length) {
93
104
  this.otherAttData = data || []
@@ -18,6 +18,16 @@
18
18
  />
19
19
  </el-form-item>
20
20
  </el-form>
21
+ <ExpandablePane v-if="otherAttDataA.length > 0" title="自定义项" :default-expand="true">
22
+ <el-form ref="approveBtnGroup" label-position="right" :label-width="_lang === 'zh' ? '12em' : '12em'">
23
+ <div
24
+ class="p-b-lg p-t-lg p-r-lg"
25
+ style="max-height: 150px; overflow-y: auto; border: 1px dashed var(--border-color-base); border-radius: 5px"
26
+ >
27
+ <show-other-att-new ref="showOtherAttNew" :form="customizationList" :otherAttDataA="otherAttDataA" />
28
+ </div>
29
+ </el-form>
30
+ </ExpandablePane>
21
31
  <span slot="footer">
22
32
  <el-button type="primary" @click="submit">{{ $lc('提交') }}</el-button>
23
33
  <el-button plain @click="visible = false">{{ $lc('取消') }}</el-button>
@@ -28,6 +38,8 @@
28
38
 
29
39
  <script>
30
40
  import { $lc } from '../../utils/i18n/index'
41
+ import ShowOtherAttNew from '../ApprovalButtons/showOtherAttrNew.vue'
42
+ import ExpandablePane from '../Expandable/main.vue'
31
43
  export default {
32
44
  name: 'HandlingAdvice',
33
45
  props: {
@@ -52,13 +64,16 @@ export default {
52
64
  default: 5
53
65
  }
54
66
  },
67
+ components: { ShowOtherAttNew, ExpandablePane },
55
68
  data() {
56
69
  return {
70
+ customizationList: {},
57
71
  visible: false,
58
72
  flowOptions: [],
59
73
  cb: null,
60
74
  reasonSelect: '',
61
- reason: ''
75
+ reason: '',
76
+ otherAttDataA: []
62
77
  }
63
78
  },
64
79
  methods: {
@@ -70,13 +85,14 @@ export default {
70
85
  const { data, code } = await this.$axios.post(`/bems/activiti/admin/todo/isFlowStartWithOptions`, { typeCode })
71
86
  if (code === 200) {
72
87
  this.visible = data.whether ?? false
88
+ this.otherAttDataA = data.customizationList || []
73
89
  this.flowOptions = data?.opinions?.map((d) => {
74
90
  return {
75
91
  label: d,
76
92
  value: d
77
93
  }
78
94
  })
79
- if (!data.whether && this.afterGetConf) {
95
+ if (!data.whether && this.afterGetConf && this.otherAttDataA.length === 0) {
80
96
  this.afterGetConf()
81
97
  }
82
98
  }
@@ -85,11 +101,12 @@ export default {
85
101
  this.reason = val
86
102
  },
87
103
  submit() {
104
+ const getOtherAttData = this.$refs['showOtherAttNew'] && this.$refs['showOtherAttNew']?.getOtherAttData()
88
105
  this.visible = false
89
106
  if (this.beforeSubmit) {
90
- this.beforeSubmit(this.reason)
107
+ this.beforeSubmit(this.reason, getOtherAttData)
91
108
  }
92
- this.$emit('submit', this.reason)
109
+ this.$emit('submit', this.reason, getOtherAttData)
93
110
  }
94
111
  }
95
112
  }