Commit ac2e2ae3 by crushh

Merge branch 'feature/ai营销二期' into dev

parents 1ad9e251 164fdf1d
......@@ -332,7 +332,6 @@ export default {
} else {
params = { ...this.activityData, search, storeGroupId, orderBy };
}
console.log(params);
return { ...this.activityData, ...params };
}
},
......@@ -436,7 +435,8 @@ export default {
this.cardLoading = false;
}
},
async aiTransformStoreGroupSplit(activityId, planId) {
async aiTransformStoreGroupSplit() {
const { activityId, planId } = this.activityData;
let res = await aiTransformStoreGroupSplit({ activityId, planId });
this.options.treeOptions.data = res.result || [];
},
......@@ -447,8 +447,8 @@ export default {
const { startDate, endDate, activityName, activityId } = result;
const smsFlag = result.activityPlanList[0].activityEventList[0].smsFlag;
const planId = result.activityPlanList[0].planId;
this.activityData = { startTime: startDate, endTime: endDate, smsFlag, activityName, activityId };
this.aiTransformStoreGroupSplit(activityId, planId);
this.activityData = { startTime: startDate, endTime: endDate, smsFlag, activityName, activityId, planId };
this.aiTransformStoreGroupSplit();
} catch (err) {}
},
radioChange(data) {
......
......@@ -338,7 +338,6 @@ export default {
} else {
params = { ...this.activityData, search, storeGroupId, orderBy };
}
console.log(params);
return { ...this.activityData, ...params };
}
},
......@@ -450,7 +449,8 @@ export default {
this.cardLoading = false;
}
},
async aiOutboundStoreGroupSplit(activityId, planId) {
async aiOutboundStoreGroupSplit() {
const { activityId, planId } = this.activityData;
let res = await aiOutboundStoreGroupSplit({ activityId, planId });
this.options.treeOptions.data = res.result || [];
},
......@@ -461,9 +461,9 @@ export default {
const { startDate, endDate, activityName, activityId } = result;
const smsFlag = result.activityPlanList[0].activityEventList[0].smsFlag;
const planId = result.activityPlanList[0].planId;
this.activityData = { startTime: startDate, endTime: endDate, smsFlag, activityName, activityId };
this.activityData = { startTime: startDate, endTime: endDate, smsFlag, activityName, activityId, planId };
this.aiStoreOutboundRank();
this.aiOutboundStoreGroupSplit(activityId, planId);
this.aiOutboundStoreGroupSplit();
} catch (err) {}
},
radioChange(data) {
......
......@@ -174,7 +174,8 @@ export default {
label: '平均通话时长',
value: '',
key: 'averageCallDuration',
type: 'time'
type: 'number',
unit: 'S'
}
],
[
......@@ -207,9 +208,13 @@ export default {
case 'time':
item.value = '--';
if (typeof value == 'number') {
const h = Math.floor(value / 3600);
const m = Math.floor((value % 3600) / 60);
const s = value % 60;
const h = Math.floor(value / 3600)
.toString()
.padStart(2, '0');
const m = Math.floor((value % 3600) / 60)
.toString()
.padStart(2, '0');
const s = (value % 60).toString().padStart(2, '0');
item.value = `${h}:${m}:${s}`;
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment