fix: Issues #242 done.
This commit is contained in:
@@ -202,7 +202,9 @@ export default {
|
|||||||
*/
|
*/
|
||||||
updateValidationData(data) {
|
updateValidationData(data) {
|
||||||
const nameOccurrences = {};
|
const nameOccurrences = {};
|
||||||
|
const noSortedRepeatedData = []; // 未排序的重複選擇的 data
|
||||||
let selectedData = [] // 已經選擇的 data
|
let selectedData = [] // 已經選擇的 data
|
||||||
|
|
||||||
this.informData = []; // 尚未選擇的 data
|
this.informData = []; // 尚未選擇的 data
|
||||||
this.repeatedData = []; // 重複選擇的 data
|
this.repeatedData = []; // 重複選擇的 data
|
||||||
|
|
||||||
@@ -213,7 +215,10 @@ export default {
|
|||||||
// 'Not Assigned'、'Case Attribute' 不列入驗證
|
// 'Not Assigned'、'Case Attribute' 不列入驗證
|
||||||
if(!code || code === 'case_attributes') return;
|
if(!code || code === 'case_attributes') return;
|
||||||
nameOccurrences[name]++;
|
nameOccurrences[name]++;
|
||||||
this.repeatedData.push(item);
|
// 重複的選項只出現一次
|
||||||
|
nameOccurrences[name] === 2 ? noSortedRepeatedData.push(item) : false;
|
||||||
|
// 要按照選單的順序排序
|
||||||
|
this.repeatedData = this.columnType.filter(column => noSortedRepeatedData.includes(column));
|
||||||
}else {
|
}else {
|
||||||
nameOccurrences[name] = 1;
|
nameOccurrences[name] = 1;
|
||||||
selectedData.push(name);
|
selectedData.push(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user