n20-common-lib 2.22.9 → 2.22.10

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.22.9",
3
+ "version": "2.22.10",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -106,7 +106,35 @@ export default {
106
106
  this.selectCheck = this.selectSprList?.showNextNodeAssignee || false
107
107
  },
108
108
  personChange(list) {
109
+ const prevList = this.personList || []
110
+ const { nextNodeAssigneeMinnum: min = 0, nextNodeAssigneeMaxnum: max = 0 } = this.selectSprList || {}
111
+
112
+ // 校验最大值
113
+ if (max && list.length > max) {
114
+ if (this.$message && this.$message.warning) {
115
+ this.$message.warning(`审批人数需小于 ${max} 个`)
116
+ }
117
+ // 恢复为上一次合法选择
118
+ this.$nextTick(() => {
119
+ if (this.$refs.personTable) {
120
+ this.$refs.personTable.clearSelection()
121
+ prevList.forEach((row) => {
122
+ this.$refs.personTable.toggleRowSelection(row, true)
123
+ })
124
+ }
125
+ })
126
+ return
127
+ }
128
+
129
+ // 更新当前选中
109
130
  this.personList = list
131
+
132
+ // 校验最小值(仅提示,不强制拦截)
133
+ if (min && list.length < min) {
134
+ if (this.$message && this.$message.info) {
135
+ this.$message.info(`审批人数需大于 ${min} 个`)
136
+ }
137
+ }
110
138
  },
111
139
  closeFn(item) {
112
140
  this.selectSprList = {