Quellcode durchsuchen

feat: 修改对应问题

tangning vor 2 Jahren
Ursprung
Commit
ceff8c18c1

+ 1 - 1
src/views/productOperation/viewKankan.vue

@@ -152,7 +152,7 @@
               xxl: 7,
             },
           },{
-            field: 'snCode',
+            field: 'sceneCodes',
             label: '作品码',
             component: 'Input',
             componentProps: {

+ 2 - 1
src/views/statistics/components/condition.vue

@@ -40,11 +40,13 @@ const props = defineProps({
   loading: Boolean,
   typeShow: Boolean,
   type: String,
+  timeType: String,
   name:Object,
 });
 
 type RangeValue = [Dayjs, Dayjs];
 const picker = ref('date');
+const type = ref(props.timeType ||'0');
 const value = ref(props.type ||'0');
 const selectPriceDate = ref(dayjs().subtract(6,'month').format('YYYY-MM-DD'))
 const selectTime = ref<RangeValue>([dayjs().subtract(6,'month').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]);
@@ -62,7 +64,6 @@ const options = ref<SelectProps['options']>([
     label: '月',
   },
 ]);
-const type = ref('0');
 const disabledDate = (current: Dayjs) => {
     if(selectPriceDate.value){
         return current >dayjs(selectPriceDate.value).add(2,'year')  || current < dayjs(selectPriceDate.value).subtract(2,'year')

+ 3 - 5
src/views/statistics/viewKankan/index.vue

@@ -28,8 +28,6 @@ const worksData = reactive({
 const SearchData = reactive({
   startTime: '',
   endTime: '',
-  dataType: 0,
-  type: 2,
   timeType: 'month',
   infoType: 'add',
 });
@@ -40,6 +38,7 @@ onMounted(() => {
 async function getList() {
   let downlist = [], xdata = [], downOrder = [], partOrder = [], incrementOrder = [];
   let res =  await workTrend(SearchData);
+  res = res.reverse()
   res.map((ele) => {
     xdata.push(ele.groupKey);
     // downlist.push(ele.count);
@@ -53,6 +52,7 @@ async function getList() {
   worksData.partOrder = partOrder
 }
 function Search(val) {
+  console.log('infoType',val)
   const { startTime, endTime, dataType, type } = val;
   let timeStr = {
       0:'day',
@@ -61,9 +61,7 @@ function Search(val) {
     }
   SearchData.startTime = startTime;
   SearchData.endTime = endTime;
-  SearchData.dataType = type;
-  SearchData.type = dataType;
-  SearchData.infoType = type?'add':'all';
+  SearchData.infoType = type == '0'?'add':'all';
   SearchData.timeType = timeStr[dataType] || 'month'
   getList();
 }

+ 23 - 22
src/views/statistics/viewKankan/lineEcharts.vue

@@ -1,7 +1,7 @@
 <template>
   <Card :title="title" :loading="loading">
     <template #extra>
-      <condition type="2" @change="Search" :typeShow="true"  @expor="handleExport" />
+      <condition :type="title=='管理中心用户活跃度统计'?'0':'2'"  :typeShow="title=='管理中心用户活跃度统计'" @change="Search"  @expor="handleExport" />
     </template>
       <div ref="chartRef" :style="{ height, width }"></div>
   </Card>
@@ -15,6 +15,7 @@
   import { ref, Ref, watch, onMounted, reactive } from 'vue';
   import { volumeTrend, qjuserTrend } from '/@/api/statistics/index';
   import condition from '../components/condition.vue';
+  import dayjs from 'dayjs';
   import { useECharts } from '/@/hooks/web/useECharts';
   import { exportElsxFile, } from '/@/utils/file/download';
   const props = defineProps({
@@ -23,11 +24,10 @@
   });
   const value = ref(1);
   const SearchData = reactive({
-    startTime: '',
-    endTime: '',
-    dataType: 2,
-    type: 2,
-    timeType: 'month',
+    startTime: dayjs().subtract(6,'month').format('YYYY-MM-DD'),
+    endTime: dayjs().format('YYYY-MM-DD'),
+    timeType: props.title == '云容量趋势分析'?'month':'day',
+    infoType: props.title == '云容量趋势分析'?'add':'all',
   });
   const options = ref<SelectProps['options']>([
         {
@@ -59,10 +59,16 @@
   }
   function Search(val) {
     console.log('Search',val)
+    let timeStr = {
+      0:'day',
+      1:'week',
+      2:'month',
+    }
     const { startTime, endTime, dataType, type } = val;
+    SearchData.timeType = timeStr[dataType] || 'month'
     SearchData.startTime = startTime;
     SearchData.endTime = endTime;
-    SearchData.type = dataType;
+    SearchData.infoType = props.title == '管理中心用户活跃度统计'?'all':type == '0'?'add':'all';
     getAddUser();
   }
   function handleExport(){
@@ -81,21 +87,16 @@
 }
   async function getAddUser() {
     let xdata = [], yData=[]
-    let timeStr = {
-      0:'day',
-      1:'week',
-      2:'month',
-    }
-    SearchData.timeType = timeStr[SearchData.type] || 'month'
-    let apiSrc = props.title=='云容量趋势分析'?qjuserTrend:volumeTrend
-      const data = await apiSrc(SearchData);
-      data.map(ele => {
-        xdata.push(ele.groupKey)
-        yData.push(ele.count)
-      })
-      yixStringData.value = xdata
-      viewStaticsData.value = yData
-      handlesetOptions()
+    let apiSrc = props.title=='云容量趋势分析'?volumeTrend:qjuserTrend
+    let res = await apiSrc(SearchData);
+    const data = res.reverse()
+    data.map(ele => {
+      xdata.push(ele.groupKey)
+      yData.push(ele.count)
+    })
+    yixStringData.value = xdata
+    viewStaticsData.value = yData
+    handlesetOptions()
   }
   function handlesetOptions() {
     setOptions({

+ 2 - 1
src/views/statistics/viewKankan/pieEchart.vue

@@ -10,7 +10,7 @@
   import { useECharts } from '/@/hooks/web/useECharts';
   const chartPieRef = ref<HTMLDivElement | null>(null);
   const { setOptions } = useECharts(chartPieRef as Ref<HTMLDivElement>);
-  const colorList = ['#38a0ff', '#4cca73', '#FDD56A', '#d58b55', '#c8ffff'];
+  const colorList = [ '#38a0ff', '#4cca73','#FDD56A', '#d58b55', '#c8ffff',];
   let pieData = ref([])
   var rich = {
     name: {
@@ -53,6 +53,7 @@
       legend: {
         orient: 'horizontal',
         bottom: 0,
+        data:['全景图','三维场景','综合作品']
       },
       series: [
         {