|
@@ -1,5 +1,11 @@
|
|
export default {
|
|
export default {
|
|
setPlanList(state, planList) {
|
|
setPlanList(state, planList) {
|
|
|
|
+ while(state.planList.length) {
|
|
|
|
+ state.planList.pop()
|
|
|
|
+ }
|
|
|
|
+ while(state.tempPlanList.length) {
|
|
|
|
+ state.tempPlanList.pop()
|
|
|
|
+ }
|
|
planList.forEach((planId) => {
|
|
planList.forEach((planId) => {
|
|
if(!state.planList.some(p => p.id == planId)) {
|
|
if(!state.planList.some(p => p.id == planId)) {
|
|
let plan = {};
|
|
let plan = {};
|
|
@@ -25,9 +31,35 @@ export default {
|
|
state.planList.push(plan)
|
|
state.planList.push(plan)
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ planList.forEach((planId) => {
|
|
|
|
+ if(!state.tempPlanList.some(p => p.id == planId)) {
|
|
|
|
+ let plan = {};
|
|
|
|
+ plan.id = planId;
|
|
|
|
+ plan.checked = false;
|
|
|
|
+ plan.carline = [];
|
|
|
|
+ plan.case_list = [109, 110, 111, 112, 113]
|
|
|
|
+ plan.cluster = 1
|
|
|
|
+ plan.create_time = ""
|
|
|
|
+ plan.creator = ""
|
|
|
|
+ plan.delete_flag = 0
|
|
|
|
+ plan.description = ""
|
|
|
|
+ plan.function = [1, 2]
|
|
|
|
+ plan.language = [1, 2]
|
|
|
|
+ plan.level = [1, 2]
|
|
|
|
+ plan.market = [1, 2]
|
|
|
|
+ plan.name = ""
|
|
|
|
+ plan.platform = [1, 2]
|
|
|
|
+ plan.project = [1, 2]
|
|
|
|
+ plan.sub_function = [1, 2]
|
|
|
|
+ plan.update_time = ""
|
|
|
|
+ plan.uuid = ""
|
|
|
|
+ state.tempPlanList.push(plan)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
setMaualPlanList(state, planList) {
|
|
setMaualPlanList(state, planList) {
|
|
let maualPlanList = state.planList;
|
|
let maualPlanList = state.planList;
|
|
|
|
+ console.log('=======1111111')
|
|
maualPlanList.forEach(p => {
|
|
maualPlanList.forEach(p => {
|
|
let plan = planList.find(s => s.id == p.id);
|
|
let plan = planList.find(s => s.id == p.id);
|
|
if (plan) {
|
|
if (plan) {
|
|
@@ -39,6 +71,9 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
setAutoPlanList(state, planList) {
|
|
setAutoPlanList(state, planList) {
|
|
|
|
+ while(state.autoPlanList.length) {
|
|
|
|
+ state.autoPlanList.pop()
|
|
|
|
+ }
|
|
planList.forEach((planId) => {
|
|
planList.forEach((planId) => {
|
|
if(!state.autoPlanList.some(p => p.id == planId)) {
|
|
if(!state.autoPlanList.some(p => p.id == planId)) {
|
|
let plan = {}
|
|
let plan = {}
|
|
@@ -89,4 +124,19 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ clearPlanList(state) {
|
|
|
|
+ console.log('=======2222222')
|
|
|
|
+ while(state.planList.length) {
|
|
|
|
+ state.planList.pop()
|
|
|
|
+ }
|
|
|
|
+ let len = state.tempPlanList.length;
|
|
|
|
+ for(let i = 0; i < len; i++) {
|
|
|
|
+ let plan = state.tempPlanList[i];
|
|
|
|
+ let t = {}
|
|
|
|
+ for(let key in plan) {
|
|
|
|
+ t[key] = plan[key]
|
|
|
|
+ }
|
|
|
|
+ state.planList.push(t)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|