|
@@ -16,6 +16,10 @@ export default {
|
|
name: 'work-transfer',
|
|
name: 'work-transfer',
|
|
computed: {},
|
|
computed: {},
|
|
props: {
|
|
props: {
|
|
|
|
+ maxCount: {
|
|
|
|
+ type: Number,
|
|
|
|
+ default: 8
|
|
|
|
+ },
|
|
submitKey: {
|
|
submitKey: {
|
|
type: String,
|
|
type: String,
|
|
default: 'label'
|
|
default: 'label'
|
|
@@ -61,7 +65,7 @@ export default {
|
|
// console.log(rightData)
|
|
// console.log(rightData)
|
|
const data = []
|
|
const data = []
|
|
allData.forEach((v, i) => {
|
|
allData.forEach((v, i) => {
|
|
- if (rightData.length >= 8) {
|
|
|
|
|
|
+ if (rightData.length >= this.maxCount) {
|
|
data.push({
|
|
data.push({
|
|
...v,
|
|
...v,
|
|
key: i,
|
|
key: i,
|
|
@@ -97,7 +101,7 @@ export default {
|
|
const totalArr = this.checked.concat(val)
|
|
const totalArr = this.checked.concat(val)
|
|
const totalLen = rightdLen + leftLen
|
|
const totalLen = rightdLen + leftLen
|
|
// console.log(totalLen, totalArr)
|
|
// console.log(totalLen, totalArr)
|
|
- if (totalLen >= 8) {
|
|
|
|
|
|
+ if (totalLen >= this.maxCount) {
|
|
this.transferData.forEach((v, i) => {
|
|
this.transferData.forEach((v, i) => {
|
|
// console.log(totalArr.indexOf(i) === -1)
|
|
// console.log(totalArr.indexOf(i) === -1)
|
|
if (totalArr.indexOf(i) === -1) {
|
|
if (totalArr.indexOf(i) === -1) {
|
|
@@ -113,7 +117,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onChange (val) {
|
|
onChange (val) {
|
|
- if (val.length < 8) {
|
|
|
|
|
|
+ if (val.length < this.maxCount) {
|
|
this.transferData.forEach((v, i) => {
|
|
this.transferData.forEach((v, i) => {
|
|
v.disabled = false
|
|
v.disabled = false
|
|
})
|
|
})
|