浏览代码

feat(组件): 修改bug

tangning 2 年之前
父节点
当前提交
9e8645922f

+ 1 - 1
.env.development

@@ -6,7 +6,7 @@ VITE_PUBLIC_PATH = ./
 
 
 # Cross-domain proxy, you can configure multiple
 # Cross-domain proxy, you can configure multiple
 # Please note that no line breaks
 # Please note that no line breaks
-VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://v4-test.4dkankan.com/service/manage/common/upload/files"],["/service","http://v4-test.4dkankan.com"]]
+VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","https://v4-uat.4dkankan.com/service/manage/common/upload/files"],["/service","https://v4-uat.4dkankan.com"]]
 # VITE_PROXY=[["/api","https://vvbin.cn/test"]]
 # VITE_PROXY=[["/api","https://vvbin.cn/test"]]
 
 
 # Delete console
 # Delete console

+ 1 - 1
.env.production

@@ -5,7 +5,7 @@ VITE_USE_MOCK = true
 VITE_PUBLIC_PATH = ./
 VITE_PUBLIC_PATH = ./
 
 
 # VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://v4-test.4dkankan.com/service/manage/common/upload/files"],["/service","http://v4-test.4dkankan.com/service/"]]
 # VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://v4-test.4dkankan.com/service/manage/common/upload/files"],["/service","http://v4-test.4dkankan.com/service/"]]
-VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://v4-test.4dkankan.com/service/manage/common/upload/files"],["/service","http://v4-test.4dkankan.com"]]
+VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","https://v4-uat.4dkankan.com/service/manage/common/upload/files"],["/service","https://v4-uat.4dkankan.com"]]
 
 
 # Delete console
 # Delete console
 VITE_DROP_CONSOLE = true
 VITE_DROP_CONSOLE = true

+ 1 - 1
src/api/product/index.ts

@@ -5,7 +5,7 @@ import { ContentTypeEnum } from '/@/enums/httpEnum';
 
 
 enum Api {
 enum Api {
   cameraVersionList = '/service/manage/cameraVersion/list',
   cameraVersionList = '/service/manage/cameraVersion/list',
-  upload = '/service/manage/common/upload/files',
+  upload = '/upload',
   spaceSdkList = '/service/manage/spaceSdk/list',
   spaceSdkList = '/service/manage/spaceSdk/list',
   spaceSdkUpdate = '/service/manage/spaceSdk/update',
   spaceSdkUpdate = '/service/manage/spaceSdk/update',
   spaceSdkOnline = '/service/manage/spaceSdk/online',
   spaceSdkOnline = '/service/manage/spaceSdk/online',

+ 1 - 1
src/components/Tree/src/Tree.vue

@@ -415,7 +415,7 @@
           );
           );
 
 
           return (
           return (
-            <Tree.TreeNode {...propsData} node={toRaw(item)} key={get(item, keyField)}>
+            <Tree.TreeNode {...propsData} showCheckedStrategy="TreeSelect.SHOW_ALL" node={toRaw(item)} key={get(item, keyField)}>
               {{
               {{
                 title: () => (
                 title: () => (
                   <span
                   <span

+ 3 - 2
src/utils/treeUtils.ts

@@ -58,9 +58,10 @@ export function getTreeId(treeNodes: TreeMenuNode[]): number[] {
   let TreeIdList:number[] =  []
   let TreeIdList:number[] =  []
   function getTreeIdList(list:TreeMenuNode[]) {
   function getTreeIdList(list:TreeMenuNode[]) {
     return list.map(ele => {
     return list.map(ele => {
-      TreeIdList.push(ele.id)
-      if(ele.children){
+      if(ele.children && ele.children.length){
         getTreeIdList(ele.children)
         getTreeIdList(ele.children)
+      }else{
+        TreeIdList.push(ele.id)
       }
       }
     })
     })
   }
   }

+ 19 - 0
src/views/customer/device.vue

@@ -74,6 +74,16 @@
           dataIndex: 'type',
           dataIndex: 'type',
           ellipsis: false,
           ellipsis: false,
           width: 80,
           width: 80,
+          customRender: ({ record }) => {
+            let typeObj ={
+              '0':'旧双目相机',
+              '1':'四维看看',
+              '2':'四维看看lite',
+              '9':'四维看见',
+              '10':'四维深时',
+            }
+            return typeObj[record.type]
+          }
         },
         },
 
 
         {
         {
@@ -85,6 +95,15 @@
           title: '出库类型',
           title: '出库类型',
           dataIndex: 'outType',
           dataIndex: 'outType',
           width: 80,
           width: 80,
+          // customRender: ({ record }) => {
+          //   let typeObj ={
+          //     '0':'正常销售',
+          //     '1':'员工自用',
+          //     '2':'礼品赠送',
+          //     '3':'其他',
+          //   }
+          //   return typeObj[record.outType]
+          // }
         },
         },
         {
         {
           title: '客户名称',
           title: '客户名称',

+ 14 - 12
src/views/device/detailsMoadl.vue

@@ -22,6 +22,7 @@ import { defineComponent, ref, onMounted, reactive } from 'vue';
 import { BasicModal, useModalInner } from '/@/components/Modal';
 import { BasicModal, useModalInner } from '/@/components/Modal';
 import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
 import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
 import { useMessage } from '/@/hooks/web/useMessage';
 import { useMessage } from '/@/hooks/web/useMessage';
+import { companyList } from '/@/api/customer';
 // import { sceneMove } from '/@/api/operate';
 // import { sceneMove } from '/@/api/operate';
 import { downTemplate } from '/@/api/customer';
 import { downTemplate } from '/@/api/customer';
 import { cameraParam, cameraUpdate, cameraOut } from '/@/api/device';
 import { cameraParam, cameraUpdate, cameraOut } from '/@/api/device';
@@ -67,12 +68,12 @@ export default defineComponent({
           options: [
           options: [
             {
             {
               label: t('routes.product.outType.0'),
               label: t('routes.product.outType.0'),
-              value: 0,
+              value: '0',
               key: '0',
               key: '0',
             },
             },
             {
             {
               label: t('routes.product.outType.1'),
               label: t('routes.product.outType.1'),
-              value: 1,
+              value: '1',
               key: '1',
               key: '1',
             },
             },
             {
             {
@@ -82,7 +83,7 @@ export default defineComponent({
             },
             },
             {
             {
               label: t('routes.product.outType.3'),
               label: t('routes.product.outType.3'),
-              value: 3,
+              value: '3',
               key: '3',
               key: '3',
             },
             },
           ],
           ],
@@ -98,15 +99,16 @@ export default defineComponent({
         componentProps: {
         componentProps: {
           filterOption: onFilterOption,
           filterOption: onFilterOption,
           onSearch: async (searchText: string) => {
           onSearch: async (searchText: string) => {
-            const paramList = await cameraParam({ type: 1, companyName: searchText });
-            console.log('searchText', searchText, paramList);
-            optionsName.value = !searchText
-              ? []
-              : [
-                  { value: searchText },
-                  { value: searchText + searchText },
-                  { value: searchText + searchText + searchText },
-                ];
+            const {list} = await companyList({ companyName: searchText });
+            let optionsList = list.map((ele) => { return { ...ele,value: ele.companyName }; }) || []
+            console.log('paramList',optionsList)
+            optionsName.value = optionsList || [];
+            updateSchema({
+              field: 'companyName',
+              componentProps:{
+                options: optionsName.value,
+              },
+            })
           },
           },
           onChange: (data) => {
           onChange: (data) => {
             console.log('data', data);
             console.log('data', data);

+ 31 - 2
src/views/device/index.vue

@@ -107,7 +107,17 @@
           title: '设备类型',
           title: '设备类型',
           dataIndex: 'type',
           dataIndex: 'type',
           ellipsis: false,
           ellipsis: false,
-          width: 80,
+          width: 80,  
+          customRender: ({ record }) => {
+            let typeObj ={
+              '0':'旧双目相机',
+              '1':'四维看看',
+              '2':'四维看看lite',
+              '9':'四维看见',
+              '10':'四维深时',
+            }
+            return typeObj[record.type]
+          }        
         },
         },
 
 
         {
         {
@@ -119,6 +129,15 @@
           title: '出库类型',
           title: '出库类型',
           dataIndex: 'outType',
           dataIndex: 'outType',
           width: 80,
           width: 80,
+          customRender: ({ record }) => {
+            let typeObj ={
+              '0':'正常销售',
+              '1':'员工自用',
+              '2':'礼品赠送',
+              '3':'其他',
+            }
+            return typeObj[record.outType]
+          }
         },
         },
         {
         {
           title: '客户名称',
           title: '客户名称',
@@ -192,9 +211,12 @@
             },
             },
           },
           },
           {
           {
-            field: 'sceneName',
+            field: 'ctivated',
             label: '下单时间',
             label: '下单时间',
             component: 'RangePicker',
             component: 'RangePicker',
+            componentProps: {
+              format: 'YYYY-MM-DD',
+            },
             colProps: {
             colProps: {
               xl: 7,
               xl: 7,
               xxl: 7,
               xxl: 7,
@@ -272,6 +294,13 @@
         showTableSetting: true,
         showTableSetting: true,
         showIndexColumn:false,
         showIndexColumn:false,
         rowKey: 'id',
         rowKey: 'id',
+        beforeFetch:(T)=>{
+          if(T.ctivated){
+            T.activatedStartTime = T.ctivated[0]
+            T.activatedEndTime = T.ctivated[1]
+          }
+          return T
+        },
         fetchSetting: {
         fetchSetting: {
           pageField: 'pageNum',
           pageField: 'pageNum',
           sizeField: 'pageSize',
           sizeField: 'pageSize',

+ 1 - 1
src/views/operate/agent.vue

@@ -38,7 +38,7 @@
   import { Divider, Card, Empty, Descriptions, Steps, Tabs } from 'ant-design-vue';
   import { Divider, Card, Empty, Descriptions, Steps, Tabs } from 'ant-design-vue';
   import { agentAuditList, agentAuditHandle } from '/@/api/operate'
   import { agentAuditList, agentAuditHandle } from '/@/api/operate'
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useI18n } from '/@/hooks/web/useI18n';
-  import addMessgeModal from './components/message/addModal.vue'
+  import addMessgeModal from './components/agent/addModal.vue'
   import { useModal } from '/@/components/Modal';
   import { useModal } from '/@/components/Modal';
   import { agentSchema, refundTimeTableData } from './data';
   import { agentSchema, refundTimeTableData } from './data';
   import { usePermissionStore } from '/@/store/modules/permission';
   import { usePermissionStore } from '/@/store/modules/permission';

+ 1 - 1
src/views/operate/components/agent/addModal.vue

@@ -9,7 +9,7 @@
     @ok="handleSubmit"
     @ok="handleSubmit"
   >
   >
     <div class="pt-2px pr-3px">
     <div class="pt-2px pr-3px">
-      <BasicForm @register="registerForm" :model="model" >
+      <BasicForm @register="registerForm">
         <template #text="{ model, field }">
         <template #text="{ model, field }">
           {{ model[field]  }}
           {{ model[field]  }}
         </template>
         </template>

+ 5 - 0
src/views/operate/components/message/addModal.vue

@@ -49,6 +49,11 @@
           label: 'id',
           label: 'id',
           required: false,
           required: false,
         },{
         },{
+          field: 'name',
+          component: 'Input',
+          label: 'name',
+          required: true,
+        },{
             field: 'noteContent',
             field: 'noteContent',
             component: 'InputTextArea',
             component: 'InputTextArea',
             required: true,
             required: true,

+ 2 - 2
src/views/operate/components/new/addModal.vue

@@ -97,7 +97,7 @@
           label: '类型',
           label: '类型',
           component: 'RadioButtonGroup',
           component: 'RadioButtonGroup',
           required: true,
           required: true,
-          defaultValue: 1,
+          defaultValue: 2,
           componentProps: {
           componentProps: {
             onChange: NewTypeChange,
             onChange: NewTypeChange,
             options: [
             options: [
@@ -109,6 +109,7 @@
             field: 'newsUrl',
             field: 'newsUrl',
             component: 'Input',
             component: 'Input',
             label: '新闻链接',
             label: '新闻链接',
+            ifShow:false,
             required: true,
             required: true,
             colProps: {
             colProps: {
               span: 22,
               span: 22,
@@ -119,7 +120,6 @@
           label: '新闻内容',
           label: '新闻内容',
           component: 'Input',
           component: 'Input',
           required: true,
           required: true,
-          ifShow:false,
           colProps: {
           colProps: {
             span: 22,
             span: 22,
           },
           },

+ 13 - 13
src/views/operate/sceneList.vue

@@ -35,7 +35,7 @@
   import { intercomMessageList, intercomMessageHandle } from '/@/api/operate'
   import { intercomMessageList, intercomMessageHandle } from '/@/api/operate'
   import { sceneApplyList } from '/@/api/operate'
   import { sceneApplyList } from '/@/api/operate'
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useI18n } from '/@/hooks/web/useI18n';
-  import addMessgeModal from './components/message/addModal.vue'
+  import addMessgeModal from './components/scene/addModal.vue'
   import { useModal } from '/@/components/Modal';
   import { useModal } from '/@/components/Modal';
   import { DMegaSchema, refundTimeTableData } from './data';
   import { DMegaSchema, refundTimeTableData } from './data';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { useMessage } from '/@/hooks/web/useMessage';
@@ -120,7 +120,7 @@
         actionColumn: {
         actionColumn: {
           width: 100,
           width: 100,
           title: '操作',
           title: '操作',
-          ifShow:state.value == 1,
+          ifShow:state.value == 0,
           dataIndex: 'action',
           dataIndex: 'action',
           slots: { customRender: 'action' },
           slots: { customRender: 'action' },
         },
         },
@@ -130,17 +130,17 @@
         reload();
         reload();
       }
       }
       async function handleWithdraw(record: Recordable) {
       async function handleWithdraw(record: Recordable) {
-        createConfirm({
-          iconType: 'info',
-          title: '发送邮件',
-          content: `此操作将对${record.applicationName}进行删除, 是否继续?`,
-          onOk: async () => {
-            await buryPointDlt({ id: record.id });
-            reload();
-            createMessage.success(t('common.optSuccess'));
-          },
-        });
-        // openModal(true,record)
+        // createConfirm({
+        //   iconType: 'info',
+        //   title: '发送邮件',
+        //   content: `此操作将对${record.applicationName}进行删除, 是否继续?`,
+        //   onOk: async () => {
+        //     await buryPointDlt({ id: record.id });
+        //     reload();
+        //     createMessage.success(t('common.optSuccess'));
+        //   },
+        // });
+        openModal(true,record)
       }
       }
       return {
       return {
         registerTimeTable,
         registerTimeTable,

+ 2 - 2
src/views/statistics/camera/index.vue

@@ -22,7 +22,7 @@
     startTime:'',
     startTime:'',
     endTime:'',
     endTime:'',
     dataType:0,
     dataType:0,
-    type:0,
+    type:2,
   })
   })
   async function getList() {
   async function getList() {
     let downlist = [],xdata = []
     let downlist = [],xdata = []
@@ -47,7 +47,7 @@
     console.log('params',val)
     console.log('params',val)
     SearchData.startTime = startTime
     SearchData.startTime = startTime
     SearchData.endTime = endTime
     SearchData.endTime = endTime
-    SearchData.dataType = dataType
+    SearchData.dataType = type
     SearchData.type = dataType
     SearchData.type = dataType
     // SearchData.type = type
     // SearchData.type = type
     getList()
     getList()

+ 0 - 38
src/views/statistics/components/SiteAnalysis.vue

@@ -1,38 +0,0 @@
-<template>
-  <Card
-    :tab-list="tabListTitle"
-    v-bind="$attrs"
-    :active-tab-key="activeKey"
-    @tabChange="onTabChange"
-  >
-    <p v-if="activeKey === 'tab1'">
-      <VisitAnalysis />
-    </p>
-    <p v-if="activeKey === 'tab2'">
-      <VisitAnalysisBar />
-    </p>
-  </Card>
-</template>
-<script lang="ts" setup>
-  import { ref } from 'vue';
-  import { Card } from 'ant-design-vue';
-  import VisitAnalysis from './VisitAnalysis.vue';
-  import VisitAnalysisBar from './VisitAnalysisBar.vue';
-
-  const activeKey = ref('tab1');
-
-  const tabListTitle = [
-    {
-      key: 'tab1',
-      tab: '流量趋势',
-    },
-    {
-      key: 'tab2',
-      tab: '访问量',
-    },
-  ];
-
-  function onTabChange(key) {
-    activeKey.value = key;
-  }
-</script>

+ 182 - 0
src/views/statistics/components/activelineEchart.vue

@@ -0,0 +1,182 @@
+<template>
+  <Card title="用户活跃度" :loading="loading">
+    <template #extra>
+      <condition type="2" @change="Search" :typeShow="true"  @expor="handleExport" />
+      <!-- <div class="condition">
+          <div class="selct" style="display: inline-block;">
+            <span style="margin-right:15px">颗粒度</span>
+            <Select
+            v-model:value="value"
+            style="width: 100px;margin-right:30px"
+            placeholder="请选择颗粒度"
+            :options="options"
+            :defaultValue="1"
+            @change="handleChange"
+          ></Select>
+          </div>
+          <a-button type="primary" @click="handleExport">导出</a-button>
+      </div> -->
+    </template>
+      <div ref="chartRef" :style="{ height, width }"></div>
+  </Card>
+</template>
+<script lang="ts">
+  import { basicProps } from './props';
+  // import { dateUtil } from '/@/utils/dateUtil';
+  import { Card, Select } from 'ant-design-vue';
+  import type { SelectProps } from 'ant-design-vue';
+</script>
+<script lang="ts" setup>
+  import { ref, Ref, watch, onMounted, reactive } from 'vue';
+  import { userTrend } from '/@/api/statistics/index';
+  import condition from './condition.vue';
+  // import type { dataItemType } from './props';
+  import { useECharts } from '/@/hooks/web/useECharts';
+  import { exportElsxFile, } from '/@/utils/file/download';
+  const props = defineProps({
+  loading: Boolean,
+    ...basicProps,
+  });
+  const value = ref(1);
+  const SearchData = reactive({
+    startTime: '',
+    endTime: '',
+    dataType: 2,
+    type: 2,
+  });
+  const options = ref<SelectProps['options']>([
+        {
+          value: 1,
+          label: '日',
+        },
+        {
+          value: 2,
+          label: '周',
+        },
+        {
+          value: 3,
+          label: '月',
+        },
+      ]);
+  const viewStaticsData = ref<number[]>([]);
+  const shareStaticsData = ref<number[]>([]);
+  const yixStringData = ref<string[]>([]);
+  const maxSize = ref(0);
+  const chartRef = ref<HTMLDivElement | null>(null);
+  const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
+  onMounted(() => {
+    getAddUser();
+  });
+  function handleChange(val){
+    console.log('handleChange',val)
+    SearchData.value = val
+    getAddUser()
+  }
+  function Search(val) {
+    const { startTime, endTime, dataType, type } = val;
+    console.log('params', val);
+    SearchData.startTime = startTime;
+    SearchData.endTime = endTime;
+    // SearchData.dataType = type;
+    SearchData.type = dataType;
+    getAddUser();
+  }
+  function handleExport(){
+  console.log('props',props.propsData)
+  let hader = ['日期', '数量']
+    let data = yixStringData.value.map((ele,index) => {
+      return {
+        '日期':ele,
+        '数量':viewStaticsData.value && viewStaticsData.value[index] || 0,
+      }
+    })
+    exportElsxFile(hader,data,'用户趋势')
+}
+  async function getAddUser() {
+    let xdata = [], yData=[]
+      const data = await userTrend(SearchData);
+      data.map(ele => {
+        xdata.push(ele.groupKey)
+        yData.push(ele.count)
+      })
+      yixStringData.value = xdata
+      viewStaticsData.value = yData
+      handlesetOptions()
+  }
+  function handlesetOptions() {
+    setOptions({
+      tooltip: {
+        trigger: 'axis',
+        axisPointer: {
+          lineStyle: {
+            width: 1,
+            color: '#019680',
+          },
+        },
+      },
+      legend: {
+        orient: 'horizontal',
+        bottom: 0,
+      },
+      // grid: { left: '2%', right: '2%', top: '10%', bottom: '10%', containLabel: true },
+      xAxis: {
+        type: 'category',
+        // data: [...new Array(30)].map((_item, index) => `${index + 1}日`),
+        data: yixStringData.value,
+      },
+      yAxis: {
+        type: 'value',
+        // max: maxSize.value,
+        splitNumber: 4,
+      },
+      series: [
+        {
+          data: viewStaticsData.value,
+          type: 'line',
+          itemStyle: { color: '#38a0ff' },
+          // barMaxWidth: 80,
+          name: '用户趋势',
+        },
+        // {
+        //   data: shareStaticsData.value,
+        //   type: 'line',
+        //   itemStyle: { color: '#4cca73' },
+        //   // barMaxWidth: 80,
+        //   name: '用户分享数',
+        // },
+      ],
+    });
+  }
+  // props.viewStatics,
+  watch(
+    // () => [props.viewStatics, props.shareStatics],
+    // ([data1, data2]) => {
+    () => props.loading,
+    () => {
+      console.log('viewStatics-data');
+      // viewStaticsData.value = data1.reduce<number[]>(
+      //   (prev: number[], current) => prev.concat(Number(current.amount)),
+      //   [],
+      // );
+
+      // yixStringData.value = data1.reduce<string[]>(
+      //   (prev: string[], current) => prev.concat(current.date),
+      //   [],
+      // );
+      // shareStaticsData.value = data2.reduce<number[]>(
+      //   (prev: number[], current) => prev.concat(Number(current.amount)),
+      //   [],
+      // );
+
+      const maxNumber = Math.max(...viewStaticsData.value.concat(shareStaticsData.value));
+      const pow = Math.pow(10, maxNumber.toString().length - 1);
+      maxSize.value = maxNumber > 10 ? Math.floor(maxNumber / 10) * 10 + pow * 2 : 10;
+      console.log('maxSize', maxSize.value);
+      handlesetOptions();
+    },
+    {
+      immediate: true,
+      deep: true,
+    },
+  );
+</script>

+ 7 - 4
src/views/statistics/components/condition.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
   <div class="condition">
   <div class="condition">
-    <div class="selct" style="display: inline-block">
+    <div class="selct" style="display: inline-block" v-if="!typeShow">
       <!-- <span style="margin-right:15px"></span> -->
       <!-- <span style="margin-right:15px"></span> -->
       <Select
       <Select
         v-model:value="type"
         v-model:value="type"
@@ -38,11 +38,14 @@ import type { Dayjs } from 'dayjs';
 import dayjs from 'dayjs';
 import dayjs from 'dayjs';
 const props = defineProps({
 const props = defineProps({
   loading: Boolean,
   loading: Boolean,
+  typeShow: Boolean,
+  type: String,
+  name:Object,
 });
 });
 
 
 type RangeValue = [Dayjs, Dayjs];
 type RangeValue = [Dayjs, Dayjs];
 const picker = ref('date');
 const picker = ref('date');
-const value = ref('0');
+const value = ref(props.type ||'0');
 const selectTime = ref<RangeValue>();
 const selectTime = ref<RangeValue>();
 const options = ref<SelectProps['options']>([
 const options = ref<SelectProps['options']>([
   {
   {
@@ -62,11 +65,11 @@ const type = ref('0');
 const typeOptions = ref<SelectProps['options']>([
 const typeOptions = ref<SelectProps['options']>([
   {
   {
     value: '0',
     value: '0',
-    label: '数量',
+    label: props.name && props.name[0] || '新增',
   },
   },
   {
   {
     value: '1',
     value: '1',
-    label: '金额',
+    label: props.name && props.name[1] || '累加',
   },
   },
 ]);
 ]);
 function handleData(val) {
 function handleData(val) {

+ 5 - 5
src/views/statistics/components/orderEchart.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <Card :title="title||'订单数据统计'">
   <Card :title="title||'订单数据统计'">
     <template #extra>
     <template #extra>
-      <condition @change="Search" @expor="expor" />
+      <condition type="2" :typeShow="title=='相机出库数量统计'" :name="title=='订单数据统计'?{1:'金额',0:'数量'}:{}" @change="Search" @expor="expor" />
     </template>
     </template>
     <div ref="chartRef" :style="{ height, width }"></div>
     <div ref="chartRef" :style="{ height, width }"></div>
   </Card>
   </Card>
@@ -37,12 +37,12 @@
     let data = yixStringData.value.map((ele,index) => {
     let data = yixStringData.value.map((ele,index) => {
       return {
       return {
         '时间':ele,
         '时间':ele,
-        '下载订单':downOrderData.value && downOrderData.value[index] || 0,
-        '权益订单':incrementOrderData.value && incrementOrderData.value[index] || 0,
-        '配件订单':partsOrderData.value && partsOrderData.value[index] || 0,
+        [hader[1]]:downOrderData.value && downOrderData.value[index] || 0,
+        [hader[2]]:incrementOrderData.value && incrementOrderData.value[index] || 0,
+        [hader[3]]:partsOrderData.value && partsOrderData.value[index] || 0,
       }
       }
     })
     })
-    exportElsxFile(hader,data,'订单趋势')
+    exportElsxFile(hader,data,props.title)
   }
   }
   function handlesetOptions() {
   function handlesetOptions() {
     console.log('handlesetOptions',downOrderData.value,partsOrderData.value,partsOrderData.value,yixStringData.value)
     console.log('handlesetOptions',downOrderData.value,partsOrderData.value,partsOrderData.value,yixStringData.value)

+ 1 - 1
src/views/statistics/components/sceneEchart.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <Card :title="title||'订单数据统计'">
   <Card :title="title||'订单数据统计'">
     <template #extra>
     <template #extra>
-      <condition @change="Search" @expor="expor" />
+      <condition type="2"  @change="Search" @expor="expor" />
     </template>
     </template>
     <div ref="chartRef" :style="{ height, width }"></div>
     <div ref="chartRef" :style="{ height, width }"></div>
   </Card>
   </Card>

+ 23 - 6
src/views/statistics/components/scenelineEcharts.vue

@@ -1,7 +1,8 @@
 <template>
 <template>
   <Card title="成交占比" :loading="loading">
   <Card title="成交占比" :loading="loading">
     <template #extra>
     <template #extra>
-      <div class="condition">
+      <condition type="2" @change="Search"  @expor="handleExport" />
+      <!-- <div class="condition">
           <div class="selct" style="display: inline-block;">
           <div class="selct" style="display: inline-block;">
             <span style="margin-right:15px">颗粒度</span>
             <span style="margin-right:15px">颗粒度</span>
             <Select
             <Select
@@ -14,7 +15,7 @@
           ></Select>
           ></Select>
           </div>
           </div>
           <a-button type="primary" @click="handleExport">导出</a-button>
           <a-button type="primary" @click="handleExport">导出</a-button>
-      </div>
+      </div> -->
     </template>
     </template>
       <div ref="chartRef" :style="{ height, width }"></div>
       <div ref="chartRef" :style="{ height, width }"></div>
   </Card>
   </Card>
@@ -26,8 +27,9 @@
   import type { SelectProps } from 'ant-design-vue';
   import type { SelectProps } from 'ant-design-vue';
 </script>
 </script>
 <script lang="ts" setup>
 <script lang="ts" setup>
-  import { ref, Ref, watch, onMounted } from 'vue';
+  import { ref, Ref, watch, onMounted, reactive } from 'vue';
   import { userTrend } from '/@/api/statistics/index';
   import { userTrend } from '/@/api/statistics/index';
+  import condition from './condition.vue';
   // import type { dataItemType } from './props';
   // import type { dataItemType } from './props';
   import { useECharts } from '/@/hooks/web/useECharts';
   import { useECharts } from '/@/hooks/web/useECharts';
   import { exportElsxFile, } from '/@/utils/file/download';
   import { exportElsxFile, } from '/@/utils/file/download';
@@ -36,6 +38,12 @@
     ...basicProps,
     ...basicProps,
   });
   });
   const value = ref(1);
   const value = ref(1);
+  const SearchData = reactive({
+    startTime: '',
+    endTime: '',
+    dataType: 0,
+    type: 2,
+  });
   const options = ref<SelectProps['options']>([
   const options = ref<SelectProps['options']>([
         {
         {
           value: 1,
           value: 1,
@@ -61,9 +69,18 @@
   });
   });
   function handleChange(val){
   function handleChange(val){
     console.log('handleChange',val)
     console.log('handleChange',val)
-    value.value = val
+    SearchData.value = val
     getAddUser()
     getAddUser()
   }
   }
+  function Search(val) {
+    const { startTime, endTime, dataType, type } = val;
+    console.log('params', val);
+    SearchData.startTime = startTime;
+    SearchData.endTime = endTime;
+    SearchData.dataType = type;
+    SearchData.type = dataType;
+    getAddUser();
+  }
   function handleExport(){
   function handleExport(){
   console.log('props',props.propsData)
   console.log('props',props.propsData)
   let hader = ['日期', '数量']
   let hader = ['日期', '数量']
@@ -77,7 +94,7 @@
 }
 }
   async function getAddUser() {
   async function getAddUser() {
     let xdata = [], yData=[]
     let xdata = [], yData=[]
-      const data = await userTrend({type:value.value});
+      const data = await userTrend(SearchData);
       data.map(ele => {
       data.map(ele => {
         xdata.push(ele.groupKey)
         xdata.push(ele.groupKey)
         yData.push(ele.count)
         yData.push(ele.count)
@@ -109,7 +126,7 @@
       },
       },
       yAxis: {
       yAxis: {
         type: 'value',
         type: 'value',
-        max: maxSize.value,
+        // max: maxSize.value,
         splitNumber: 4,
         splitNumber: 4,
       },
       },
       series: [
       series: [

+ 1 - 1
src/views/statistics/order/index.vue

@@ -22,7 +22,7 @@
     startTime:'',
     startTime:'',
     endTime:'',
     endTime:'',
     dataType:0,
     dataType:0,
-    type:0,
+    type:2
   })
   })
   onMounted(() => {
   onMounted(() => {
     getData();
     getData();

+ 2 - 0
src/views/statistics/register/index.vue

@@ -3,6 +3,7 @@
     <GrowCard :loading="loading" :list="growCardList" class="enter-y" />
     <GrowCard :loading="loading" :list="growCardList" class="enter-y" />
     <!-- <lineEcharts2  name="chartRef2" class="!my-4 enter-y" :loading="loading" /> -->
     <!-- <lineEcharts2  name="chartRef2" class="!my-4 enter-y" :loading="loading" /> -->
     <scenelineEcharts class="!my-4 enter-y" ref="myRefs" :loading="loading" /> 
     <scenelineEcharts class="!my-4 enter-y" ref="myRefs" :loading="loading" /> 
+    <activelineEchart class="!my-4 enter-y" ref="myRefs" :loading="loading" /> 
   </div>
   </div>
 </template>
 </template>
 <script lang="ts" setup>
 <script lang="ts" setup>
@@ -11,6 +12,7 @@ import { ref, onMounted, reactive } from 'vue';
 import { GrowCardItem } from '../data';
 import { GrowCardItem } from '../data';
 import GrowCard from '../components/GrowCard.vue';
 import GrowCard from '../components/GrowCard.vue';
 import scenelineEcharts from '../components/scenelineEcharts.vue';
 import scenelineEcharts from '../components/scenelineEcharts.vue';
+import activelineEchart from '../components/activelineEchart.vue';
 const loading = ref(true);
 const loading = ref(true);
 const growCardList = ref<GrowCardItem[]>([]);
 const growCardList = ref<GrowCardItem[]>([]);
 const echartData = reactive({
 const echartData = reactive({

+ 4 - 4
src/views/statistics/scene/index.vue

@@ -28,7 +28,7 @@ const SearchData = reactive({
   startTime: '',
   startTime: '',
   endTime: '',
   endTime: '',
   dataType: 0,
   dataType: 0,
-  type: 0,
+  type: 2,
 });
 });
 onMounted(() => {
 onMounted(() => {
   getData();
   getData();
@@ -37,7 +37,7 @@ onMounted(() => {
 async function getList() {
 async function getList() {
   let downlist = [],
   let downlist = [],
     xdata = [];
     xdata = [];
-  const {kjList,kkList,ssList,ssobjList} = await sceneTrend({...SearchData,type:SearchData.sceneType});
+  const {kjList,kkList,ssList,ssobjList} = await sceneTrend(SearchData);
   kjList.map((ele) => {
   kjList.map((ele) => {
     xdata.push(ele.groupKey);
     xdata.push(ele.groupKey);
     downlist.push(ele.count);
     downlist.push(ele.count);
@@ -53,8 +53,8 @@ function Search(val) {
   console.log('params', val);
   console.log('params', val);
   SearchData.startTime = startTime;
   SearchData.startTime = startTime;
   SearchData.endTime = endTime;
   SearchData.endTime = endTime;
-  SearchData.dataType = dataType;
-  SearchData.type = type;
+  SearchData.dataType = type;
+  SearchData.type = dataType;
   getList();
   getList();
 }
 }
 async function getData() {
 async function getData() {

+ 4 - 1
src/views/system/menu/menu.data.ts

@@ -203,7 +203,10 @@ export const formSchema: FormSchema[] = [
     label: t('routes.system.sortOrder'),
     label: t('routes.system.sortOrder'),
     defaultValue: 0,
     defaultValue: 0,
     component: 'InputNumber',
     component: 'InputNumber',
-    required: true,
+    componentProps: {
+      min:0
+    },
+      required: true,
   },
   },
   {
   {
     field: 'icon',
     field: 'icon',