|
@@ -25,6 +25,27 @@ const timeType = [
|
|
const timeTypeValue = ref('')
|
|
const timeTypeValue = ref('')
|
|
const selectDate = ref([])
|
|
const selectDate = ref([])
|
|
const selectBusinessValue=ref([])
|
|
const selectBusinessValue=ref([])
|
|
|
|
+// 获取选择的起止日期值
|
|
|
|
+function getStartAndEndDate(){
|
|
|
|
+ let StartDate=selectDate.value?.[0]||'',EndDate=selectDate.value?.[1]||'';
|
|
|
|
+ if(timeTypeValue.value==='今天'){
|
|
|
|
+ StartDate=moment().format('YYYY-MM-DD')
|
|
|
|
+ EndDate=moment().format('YYYY-MM-DD')
|
|
|
|
+ }else if(timeTypeValue.value==='过去3天'){
|
|
|
|
+ EndDate=moment().format('YYYY-MM-DD')
|
|
|
|
+ StartDate=moment().subtract(3,'days').format('YYYY-MM-DD')
|
|
|
|
+ }else if(timeTypeValue.value==='过去一周'){
|
|
|
|
+ EndDate=moment().format('YYYY-MM-DD')
|
|
|
|
+ StartDate=moment().subtract(7,'days').format('YYYY-MM-DD')
|
|
|
|
+ }else if(timeTypeValue.value==='过去一月'){
|
|
|
|
+ EndDate=moment().format('YYYY-MM-DD')
|
|
|
|
+ StartDate=moment().subtract(30,'days').format('YYYY-MM-DD')
|
|
|
|
+ }
|
|
|
|
+ return {
|
|
|
|
+ StartDate,
|
|
|
|
+ EndDate
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
const tableData = ref([])
|
|
const tableData = ref([])
|
|
const columns = [
|
|
const columns = [
|
|
@@ -41,27 +62,13 @@ const tablePagination = ref({
|
|
})
|
|
})
|
|
let SortParam='',SortType='';
|
|
let SortParam='',SortType='';
|
|
async function getStatisticList(){
|
|
async function getStatisticList(){
|
|
- let StartDate=selectDate.value?.[0]||'',EndDate=selectDate.value?.[1]||'';
|
|
|
|
- if(timeTypeValue.value==='今天'){
|
|
|
|
- StartDate=moment().format('YYYY-MM-DD')
|
|
|
|
- EndDate=moment().format('YYYY-MM-DD')
|
|
|
|
- }else if(timeTypeValue.value==='过去3天'){
|
|
|
|
- EndDate=moment().format('YYYY-MM-DD')
|
|
|
|
- StartDate=moment().subtract(3,'days').format('YYYY-MM-DD')
|
|
|
|
- }else if(timeTypeValue.value==='过去一周'){
|
|
|
|
- EndDate=moment().format('YYYY-MM-DD')
|
|
|
|
- StartDate=moment().subtract(7,'days').format('YYYY-MM-DD')
|
|
|
|
- }else if(timeTypeValue.value==='过去一月'){
|
|
|
|
- EndDate=moment().format('YYYY-MM-DD')
|
|
|
|
- StartDate=moment().subtract(30,'days').format('YYYY-MM-DD')
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
const res=await apiCustomerUser.getUserActionStatistic({
|
|
const res=await apiCustomerUser.getUserActionStatistic({
|
|
CurrentIndex:tablePagination.value.current,
|
|
CurrentIndex:tablePagination.value.current,
|
|
PageSize:tablePagination.value.pageSize,
|
|
PageSize:tablePagination.value.pageSize,
|
|
EtaBusinessIds:selectBusinessValue.value.join(','),
|
|
EtaBusinessIds:selectBusinessValue.value.join(','),
|
|
- StartDate:StartDate,
|
|
|
|
- EndDate:EndDate,
|
|
|
|
|
|
+ StartDate:getStartAndEndDate().StartDate,
|
|
|
|
+ EndDate:getStartAndEndDate().EndDate,
|
|
SortParam:SortParam,
|
|
SortParam:SortParam,
|
|
SortType:SortType
|
|
SortType:SortType
|
|
})
|
|
})
|
|
@@ -108,8 +115,10 @@ function handleSelectDate(){
|
|
|
|
|
|
const showFavChart=ref(false)
|
|
const showFavChart=ref(false)
|
|
const activeUser=ref(null)
|
|
const activeUser=ref(null)
|
|
|
|
+const filterDate=ref(null)
|
|
function handleShowDetail(item){
|
|
function handleShowDetail(item){
|
|
activeUser.value=item
|
|
activeUser.value=item
|
|
|
|
+ filterDate.value=getStartAndEndDate()
|
|
showFavChart.value=true
|
|
showFavChart.value=true
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -152,7 +161,11 @@ function handleShowDetail(item){
|
|
</t-table>
|
|
</t-table>
|
|
|
|
|
|
<!-- 用户收藏图表 -->
|
|
<!-- 用户收藏图表 -->
|
|
- <FavChartStatistic v-model:show="showFavChart" :data="activeUser"/>
|
|
|
|
|
|
+ <FavChartStatistic
|
|
|
|
+ v-model:show="showFavChart"
|
|
|
|
+ :data="activeUser"
|
|
|
|
+ :filterDate="filterDate"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|