소스 검색

Merge remote-tracking branch 'origin/xf_dev' into xf_dev

jxq 2 주 전
부모
커밋
826b53836a

+ 1 - 1
.env.development

@@ -11,6 +11,6 @@ VITE_APP_BASE_API = '/dev-api'
 VITE_APP_UPLOAD_URL = 'http://192.168.101.4:9000'
 # 开发接口地址
 #VITE_APP_API_URL = 'http://192.168.101.4:8078'
-VITE_APP_API_URL = 'http://121.41.179.41:8078'
+VITE_APP_API_URL = 'http://113.44.0.55:8021'
 # 是否启用 Mock 服务
 VITE_MOCK_DEV_SERVER = false

+ 8 - 0
src/api/bigScreen/index.ts

@@ -112,3 +112,11 @@ export function getOnlineInfo() {
     method: "get",
   });
 }
+
+//3D工位状态
+export function getOnline3DInfo() {
+  return request({
+    url: "/api/v1/process/census/station/state",
+    method: "post",
+  });
+}

+ 9 - 1
src/api/order/index.ts

@@ -256,7 +256,15 @@ export function zipWorkOrder(data: object): AxiosPromise<any> {
     data: data,
   });
 }
-
+export function batchAuditPrepare(
+    data: object
+): AxiosPromise<any> {
+  return request({
+    url: "/api/v1/plan/prepare/batch-audit",
+    method: "post",
+    data: data,
+  });
+}
 export function addShortage(data: object): AxiosPromise<any> {
   return request({
     url: "/api/v1/planShortage/add",

+ 6 - 0
src/api/process/index.ts

@@ -58,3 +58,9 @@ export function sendTdmTBom(
     data: params
   });
 }
+export function queryIndex(): AxiosPromise<any> {
+  return request({
+    url: "/api/v1/process/census/queryIndex",
+    method: "get",
+  });
+}

+ 1 - 0
src/api/station/index.ts

@@ -44,3 +44,4 @@ export function queryStationByLineId(lineId: any) {
     method: "get",
   });
 }
+

+ 1 - 0
src/api/system/user/types.ts

@@ -9,6 +9,7 @@ export interface UserInfo {
   roles: string[];
   perms: string[];
   deptId?: string;
+  nickName?: string;
 }
 
 /**

+ 28 - 19
src/layout/components/NavBar/components/NavbarRight.vue

@@ -40,9 +40,9 @@
           :value="unReadMessageNum"
           :max="10"
         >
-          <span>{{ userStore.user.username }}</span>
+          <span>{{ userStore.user.nickName }}</span>
         </el-badge>
-        <span v-else>{{ userStore.user.username }}</span>
+        <span v-else>{{ userStore.user.nickName }}</span>
       </div>
       <template #dropdown>
         <el-dropdown-menu>
@@ -146,17 +146,20 @@ const dialog = reactive({
   type: "0",
   state: "0",
 });
-const clickItem =(row) =>{
-  if(row.msgId === '3'){
-    window.open("/quality/faultHandle",'_blank')
+const clickItem = (row) => {
+  if (row.msgId === "3") {
+    window.open("/quality/faultHandle", "_blank");
   }
-  if(row.msgId === '4'){
-    window.open("/outsource",'_blank')
+  if (row.msgId === "4") {
+    window.open("/outsource", "_blank");
   }
-  if(row.msgId === '5'){
-    window.open("/storage/warningInfo",'_blank')
+  if (row.msgId === "5") {
+    window.open("/storage/warningInfo", "_blank");
   }
-}
+  if (row.msgId === "6") {
+    window.open("/requisition", "_blank");
+  }
+};
 const openMessageDialog = () => {
   handleQuery();
   dialog.visible = true;
@@ -213,13 +216,10 @@ function logout() {
     type: "warning",
     lockScroll: false,
   }).then(() => {
-    userStore
-      .logout()
-      .then(() => {
-        router.replace(`/login`);
-        tagsViewStore.delAllViews();
-      })
-
+    userStore.logout().then(() => {
+      router.replace(`/login`);
+      tagsViewStore.delAllViews();
+    });
   });
 }
 const clickTab = (targetName) => {
@@ -272,10 +272,19 @@ const handleQuery1 = (params, done) => {
   queryMessageList(querySearch, page1, pageData1, done);
 };
 
+const timer = ref(null);
 onMounted(() => {
   checkUnReadMessageNum();
+  timer.value = setInterval(() => {
+    checkUnReadMessageNum();
+  }, 20000);
+});
+onBeforeUnmount(() => {
+  clearInterval(timer.value);
+});
+onUnmounted(() => {
+  clearInterval(timer.value);
 });
-
 const userCenterRef = ref();
 const userCenter = () => {
   userCenterRef.value && userCenterRef.value?.show();
@@ -303,7 +312,7 @@ const userCenter = () => {
     color: var(--el-color-white);
   }
 }
-.el-scrollbar{
+.el-scrollbar {
   height: auto !important;
 }
 .dark .setting-item:hover {

+ 1 - 1
src/store/modules/user.ts

@@ -49,7 +49,7 @@ export const useUserStore = defineStore("user", () => {
           user.value.roles = data.roles;
           user.value.deptId = data.deptId;
           user.value.avatar = data.avatar;
-
+          user.value.nickName = data.nickName;
           isGetAuth.value = true;
 
           user.value.perms = data.permissions ?? [];

+ 8 - 0
src/views/base/craftManagement/route/bindConfig.ts

@@ -167,6 +167,14 @@ export const formOption = {
       value: 0,
     },*/
     {
+      label: "是否专检",
+      prop: "specialInspection",
+      span: 24,
+      type: "switch",
+      dicData: switchOp,
+      value: 0,
+    },
+    {
       label: "是否可跳过",
       prop: "skipped",
       span: 24,

+ 2 - 2
src/views/base/craftManagement/route/index.vue

@@ -281,13 +281,13 @@ option.value = Object.assign(option.value, {
       width: 150,
       search: true,
       overHidden: true,
-      rules: [
+      /*rules: [
         {
           required: true,
           message: "工艺名称不能为空",
           trigger: "blur",
         },
-      ],
+      ],*/
     },
     {
       label: "工艺类型",

+ 21 - 14
src/views/base/modeling/station/index.vue

@@ -16,19 +16,19 @@
       @current-change="dataList"
       @selection-change="selectionChange"
     >
-      <!--      <template #enable="scope">
+      <template #enable="scope">
         <el-switch
-          active-value="1"
-          inactive-value="0"
-          inline-prompt
-          active-text="启用"
-          inactive-text="禁用"
-          v-model="scope.row.enable"
-          @click="changeItem(scope.row)"
-          class="ml-2"
-          style="&#45;&#45;el-switch-on-color: #13ce66; &#45;&#45;el-switch-off-color: #ff4949"
+            active-value="1"
+            inactive-value="0"
+            inline-prompt
+            active-text="启用"
+            inactive-text="禁用"
+            v-model="scope.row.enable"
+            @click="changeItem(scope.row)"
+            class="ml-2"
+            style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
         />
-      </template>-->
+      </template>
       <template #menu-left="{ size }">
         <el-button
           :disabled="toDeleteIds.length < 1"
@@ -183,6 +183,12 @@ const changeItem = (row) => {
       message: data.msg,
       type: "success",
     });
+  }).catch(()=>{
+    if(row.enable == 1){
+      row.enable = 0
+    }else{
+      row.enable = 1
+    }
   });
 };
 // 设置表格列或者其他自定义的option
@@ -313,14 +319,15 @@ option.value = Object.assign(option.value, {
         },
       ],
     },
-    /* {
+    {
       label: "启用状态",
       slot: true,
       headerAlign: "center",
       prop: "enable",
+      addDisplay: false,
+      editDisplay: false,
       width: 100,
-      display: false,
-    },*/
+    },
     {
       label: "工位描述",
       width: 90,

+ 47 - 6
src/views/plan/prepare/index.vue

@@ -18,6 +18,20 @@
       @selection-change="selectionChange"
       :span-method="spanMethod"
     >
+      <template #menu-left="{ size }">
+        <el-button
+            :disabled="toDeleteIds.length < 1"
+            type="primary"
+            :size="size"
+            v-hasPerm="['plan:prepare:batchAudit']"
+            @click="toAduit"
+        >批量审核
+          <template #icon>
+            <svg-icon icon-class="paicheng" />
+          </template>
+        </el-button>
+      </template>
+
       <template #orderCode="{ row }">
         <el-text v-if="row.orderCode">{{ row.orderCode }}</el-text>
         <div
@@ -56,7 +70,7 @@
         <el-button type="primary" link size="small" @click="handleEdit(row, 0)"
           ><i-ep-edit />{{
             row.materialState === "0"
-              ? "发起准备"
+              ? "审核准备"
               : row.materialState === "1"
                 ? "编辑准备"
                 : "详情"
@@ -91,7 +105,7 @@
     <el-dialog
       v-model="dialog1.visible"
       :title="dialog1.title"
-      width="45%"
+      width="60%"
       @close="dialog1.visible = false"
     >
       <el-form ref="dataFormRef" :model="form" label-width="90px">
@@ -167,7 +181,7 @@
                 placeholder="准备人员"
                 size="large"
                 :disabled="
-                  form.materialState === '1' || form.materialState === '2'
+                  form.materialState === '2' || (templates[index].initUser != userStore.user.username && form.materialState === '1')
                 "
                 filterable
                 style="width: 240px"
@@ -175,7 +189,7 @@
                 <el-option
                   v-for="item in userList"
                   :key="item.userName"
-                  :label="item.userName"
+                  :label="item.nickName"
                   :value="item.userName"
                 />
               </el-select>
@@ -204,7 +218,7 @@
     <el-dialog
       v-model="dialog2.visible"
       :title="dialog2.title"
-      width="45%"
+      width="60%"
       @close="dialog2.visible = false"
     >
       <el-form ref="formRef" :model="form" label-width="90px">
@@ -325,6 +339,7 @@ import {
   bomMaterial,
   prepareCheckInfo,
   refreshPrepareCheckInfo,
+  batchAuditPrepare
 } from "@/api/order";
 import { queryChildrenInfo } from "@/api/process";
 import { useCommonStoreHook, useUserStore } from "@/store";
@@ -347,6 +362,21 @@ const feedBack = (row, index) => {
     dataTable.value = data.data;
   });
 };
+
+const toAduit = () => {
+  ElMessageBox.confirm("确定要进行批量审核吗?", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  }).then(() => {
+    const params = {"ids": toDeleteIds.value}
+    batchAuditPrepare(params).then((res)=>{
+      ElMessage.success("审核成功");
+      dataList();
+    });
+  });
+};
+
 const dialog2 = reactive({
   title: "缺料反馈",
   visible: false,
@@ -413,6 +443,17 @@ const dialog1 = reactive({
 const onSubmit = (done, loading) => {
   form.value.materialStr = JSON.stringify(templates.value);
   if (form.value.materialState === "0") {
+    let pass = true
+    //验证是否选择人员
+    templates.value.forEach((item)=>{
+      if(!item.userName){
+        pass = false
+      }
+    })
+    if(!pass){
+      ElMessage.error("请选择准备人员")
+      return;
+    }
     form.value.materialState = "1";
   }
   updateRow(done, loading);
@@ -479,7 +520,7 @@ const orderInfo = (value) => {
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
   delBtn: false,
-  selection: false,
+  selection: true,
   editBtn: false,
   tree: true,
   viewBtn: false,

+ 9 - 4
src/views/plan/requisition/exportInfo.vue

@@ -70,10 +70,15 @@ const router = useRouter();
 onMounted(() => {
   getTableData();
 });
-watch(()=>props.excelRow, () => {  getTableData();
-},{
-  deep:true
-});
+watch(
+  () => props.excelRow,
+  () => {
+    getTableData();
+  },
+  {
+    deep: true,
+  }
+);
 </script>
 <style>
 .btns {

+ 2 - 2
src/views/plan/requisition/index.vue

@@ -158,14 +158,14 @@
               border
             >
               <el-table-column label="序号" type="index" width="60" />
-              <el-table-column label="工作令号" prop="workCode">
+<!--              <el-table-column label="工作令号" prop="workCode">
                 <template v-slot="{ row }">
                   <el-text v-if="dialogType === 1 || form.state > 0">{{
                     row.workCode
                   }}</el-text>
                   <el-input v-else v-model="row.workCode" />
                 </template>
-              </el-table-column>
+              </el-table-column>-->
               <el-table-column label="零、部(组)件图号" prop="materialCode" />
               <el-table-column label="名称" prop="materialName" />
               <el-table-column label="数量" align="num">

+ 5 - 5
src/views/plan/requisition/print.vue

@@ -60,15 +60,15 @@
             <div class="leftItem">
               <div>
                 <div class="lable">物料编码:</div>
-                <template v-if="item.materialName.length > 15">
+                <template v-if="item.materialCode.length > 18">
                   <div class="value">
-                    {{ item.materialName.slice(0, 14) }}
+                    {{ item.materialCode.slice(0, 17) }}
                   </div>
                   <div class="value">
                     {{
-                      item.materialName.length > 30
-                        ? item.materialName.slice(15, 26) + "..."
-                        : item.materialName.slice(15)
+                      item.materialCode.length > 36
+                        ? item.materialCode.slice(18, 32) + "..."
+                        : item.materialCode.slice(18)
                     }}
                   </div>
                 </template>

+ 1 - 1
src/views/plan/workOrder/index.vue

@@ -58,7 +58,7 @@
           "
           type="primary"
           link
-          size="small"
+          :size="size"
           @click="handleEdit(row, 0)"
           ><i-ep-edit />编辑
         </el-button>

+ 9 - 2
src/views/pro/traceability/components/materialsCom.vue

@@ -101,9 +101,16 @@ option.value = Object.assign(option.value, {
       search: false,
     },
     {
-      label: "采集编码",
-      prop: "itemSeq",
+      label: "采集批次",
+      prop: "batchNo",
       search: false,
+      formatter: (val) => {
+        if(val.batchNo){
+          return val.batchNo;
+        }else{
+          return val.itemSeq;
+        }
+      },
     },
     {
       label: "已采集数量",

+ 18 - 9
src/views/report/statistics/screens/line3D/index.vue

@@ -13,19 +13,19 @@
             <div class="left-header">
               <div class="num-item">
                 <div class="item-title">总数</div>
-                <div class="item-num">20</div>
+                <div class="item-num">{{ infoObj.total }}</div>
               </div>
               <div class="num-item">
                 <div class="item-title">在线</div>
-                <div class="item-num">12</div>
+                <div class="item-num">{{ infoObj.online }}</div>
               </div>
               <div class="num-item">
                 <div class="item-title">离线</div>
-                <div class="item-num">2</div>
+                <div class="item-num">{{ infoObj.offline }}</div>
               </div>
               <div class="num-item">
                 <div class="item-title">故障</div>
-                <div class="item-num">0</div>
+                <div class="item-num">{{ infoObj.fault }}</div>
               </div>
             </div>
             <div class="divider"></div>
@@ -44,7 +44,7 @@
                     <div class="leftItem textComent itembg">
                       {{ item.stationName }}
                     </div>
-                    <div class="rightItem itembg">{{ item.dayRate }}</div>
+                    <div class="rightItem itembg">{{ item.state }}</div>
                   </div>
                 </div>
               </el-scrollbar>
@@ -114,8 +114,8 @@
                         </div>
                       </div>
                       <div class="info3">
-                        <div class="ip">ID:{{ item.id }}</div>
-                        <div class="ip">IP:{{ item.ip }}</div>
+                        <div class="ip">ID:{{ item.deviceNo }}</div>
+                        <div class="ip">位置:{{ item.position }}</div>
                         <div
                           class="infoState"
                           :class="{
@@ -147,6 +147,7 @@ import {
   getDeviceList,
   getMaterialRate,
   getTodayError,
+  getOnline3DInfo,
 } from "@/api/bigScreen";
 import Middle3D from "./middle3D.vue";
 const aotuStatus = ref(true);
@@ -167,9 +168,11 @@ const returnView = () => {
 };
 
 const deviceArray = ref([]);
+const infoObj = ref({});
 const getRateArray = async () => {
-  const { data } = await getTaskRate();
-  taskRateArray.value = data;
+  const { data } = await getOnline3DInfo();
+  infoObj.value = data;
+  taskRateArray.value = data.stationState;
   nextTick(() => {
     ShowScrollRef1.value.setActive();
   });
@@ -455,4 +458,10 @@ onMounted(() => {
     text-align: center;
   }
 }
+.red {
+  color: red !important;
+}
+.white {
+  color: white !important;
+}
 </style>

+ 1 - 1
src/views/report/statistics/screens/line3D/middle3D.vue

@@ -286,7 +286,7 @@ const startFnc = ref(null);
 const downFnc = ref(null);
 defineExpose({ startFnc, downFnc });
 onMounted(() => {
-  getInfoArray();
+  // getInfoArray();
   const { start, down } = init3D();
   startFnc.value = () => {
     start();

+ 12 - 5
src/views/storage/stock/index.vue

@@ -99,7 +99,7 @@ option.value = Object.assign(option.value, {
   selection: true,
   column: [
     {
-      label: "仓库编码",
+      label: "仓库",
       prop: "houseType",
       type: "select",
       search: true,
@@ -122,7 +122,7 @@ option.value = Object.assign(option.value, {
       ],
     },
     {
-      label: "料箱编号",
+      label: "料箱",
       prop: "vehicleCode",
       editDisabled: true,
       rules: [
@@ -134,7 +134,7 @@ option.value = Object.assign(option.value, {
       ],
     },
     {
-      label: "仓库坐标",
+      label: "坐标",
       prop: "coordinate",
       editDisabled: true,
       rules: [
@@ -148,6 +148,7 @@ option.value = Object.assign(option.value, {
     {
       label: "层数",
       prop: "position",
+      width: 60,
       rules: [
         {
           required: true,
@@ -169,15 +170,21 @@ option.value = Object.assign(option.value, {
       search: true,
     },*/
     {
-      label: "计划号",
+      label: "计划号",
       prop: "planNo",
       search: true,
     },
-    {
+    /*{
       label: "流转卡号",
       width: 130,
       overHidden: true,
       prop: "seqNo",
+    },*/
+    {
+      label: "物料编码",
+      prop: "materialNo",
+      width: 130,
+      search: true,
     },
     {
       label: "物料名称",

+ 6 - 0
src/views/system/logs/index.vue

@@ -375,6 +375,12 @@ const handleOperQuery = (params: any, done: any) => {
     pageNo: page.value.currentPage,
     ...params,
   };
+  if(search.value.operatorType){
+    querySearch.operatorType = search.value.operatorType
+  }
+  if(search.value.creator){
+    querySearch.creator = search.value.creator
+  }
   getOperaLogPage(querySearch)
     .then(({ data }) => {
       pageData.value = data.records;

+ 51 - 21
src/views/welcome/components/BarChart.vue

@@ -1,14 +1,14 @@
 <!--  线 + 柱混合图 -->
 <template>
   <el-card>
-    <template #header>
+<!--    <template #header>
       <div class="title">
         产量柱状图
         <el-tooltip effect="dark" content="点击试试下载" placement="bottom">
           <i-ep-download class="download" @click="downloadEchart" />
         </el-tooltip>
       </div>
-    </template>
+    </template>-->
 
     <div :id="id" :class="className" :style="{ height, width }"></div>
   </el-card>
@@ -36,8 +36,24 @@ const props = defineProps({
     default: "200px",
     required: true,
   },
+  indexSum: {
+    type: Object,
+    default: () => {
+      return null;
+    },
+  },
 });
-
+watch(
+    () => props.indexSum,
+    () => {
+      handleSum(props.indexSum)
+      chart.value.setOption(options);
+      // 大小自适应
+      window.addEventListener("resize", () => {
+        chart.value.resize();
+      });
+    }
+);
 const options = {
   grid: {
     left: "2%",
@@ -57,7 +73,7 @@ const options = {
   legend: {
     x: "center",
     y: "bottom",
-    data: ["收入", "毛利润", "收入增长率", "利润增长率"],
+    data: ["报废数", "完工任务数", "新增任务数","总完成率"],
     textStyle: {
       color: "#999",
     },
@@ -93,20 +109,20 @@ const options = {
   ],
   series: [
     {
-      name: "收入",
+      name: "报废数",
       type: "bar",
       data: [5000, 7100, 7200, 7300, 6000,7800, 3500, 7000, 7000, 7500,7500, 7100],
       barWidth: 20,
       itemStyle: {
         color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-          { offset: 0, color: "#83bff6" },
-          { offset: 0.5, color: "#188df0" },
-          { offset: 1, color: "#188df0" },
+          { offset: 0, color: "#e81968" },
+          { offset: 0.5, color: "#a91e53" },
+          { offset: 1, color: "#5b0829" },
         ]),
       },
     },
     {
-      name: "毛利润",
+      name: "完工任务数",
       type: "bar",
       data: [5100, 7200, 7300, 7800, 6100,7100, 3200, 7100, 7200, 7100,7200, 7200],
       barWidth: 20,
@@ -119,26 +135,29 @@ const options = {
       },
     },
     {
-      name: "收入增长率",
-      type: "line",
-      yAxisIndex: 1,
-      data: [60, 65, 70, 75, 80,60, 65, 70, 75, 80,23,23],
+      name: "新增任务数",
+      type: "bar",
+      data: [7100, 8200, 9300, 17800, 61100,17100, 13200, 2100, 1200, 1100,17200, 8200],
+      barWidth: 20,
       itemStyle: {
-        color: "#67C23A",
+        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+          { offset: 0, color: "#969b97" },
+          { offset: 0.5, color: "#8a988d" },
+          { offset: 1, color: "#3d3f49" },
+        ]),
       },
     },
     {
-      name: "利润增长率",
+      name: "总完成率",
       type: "line",
       yAxisIndex: 1,
-      data: [70, 75, 80, 85, 90,65, 70, 75, 80,60, 65, 70],
+      data: [60, 65, 70, 75, 80, 60, 65, 70, 75, 80, 23, 23],
       itemStyle: {
-        color: "#409EFF",
-      },
-    },
+        color: "#67C23A",
+      }
+    }
   ],
 };
-
 const downloadEchart = () => {
   // 获取画布图表地址信息
   const img = new Image();
@@ -164,6 +183,15 @@ const downloadEchart = () => {
     }
   };
 };
+const handleSum = (sum) =>{
+  options.series[0].data = sum.list1
+  options.series[1].data = sum.list2
+  options.series[2].data = sum.list3
+  options.series[3].data = sum.list4
+  options.yAxis[0].max = sum.maxNum
+  options.yAxis[0].interval = sum.maxNum
+  options.xAxis[0].data = sum.monList
+}
 
 const chart = ref<any>("");
 onMounted(() => {
@@ -171,7 +199,9 @@ onMounted(() => {
   chart.value = markRaw(
     echarts.init(document.getElementById(props.id) as HTMLDivElement)
   );
-
+  if(props.indexSum){
+    handleSum(props.indexSum)
+  }
   chart.value.setOption(options);
 
   // 大小自适应

+ 65 - 94
src/views/welcome/index.vue

@@ -12,15 +12,15 @@
               :src="userStore.user.avatar + '?imageView2/1/w/80/h/80'"
             />
             <div>
-              <p>{{ greetings }}</p>
+              <p>欢迎您!</p>
               <p class="text-sm text-gray">
-                今日天气晴朗,气温在15℃至25℃之间,东南风。
+                {{ greetings }}
               </p>
             </div>
           </div>
         </el-col>
 
-        <el-col :span="6" :xs="24">
+<!--        <el-col :span="6" :xs="24">
           <div class="flex h-full items-center justify-around">
             <el-statistic :value="99">
               <template #title>
@@ -50,7 +50,7 @@
               </template>
             </el-statistic>
           </div>
-        </el-col>
+        </el-col>-->
       </el-row>
     </el-card>
 
@@ -58,25 +58,15 @@
     <el-row :gutter="10" class="mt-3">
       <el-col :xs="24" :sm="12" :lg="6">
         <el-card shadow="never">
-          <template #header>
+          <div class="flex items-center justify-between">
+            <span class="text-[var(--el-text-color-secondary)]">订单数</span>
             <div class="flex items-center justify-between">
-              <span class="text-[var(--el-text-color-secondary)]">访客数</span>
-              <el-tag type="success">日</el-tag>
-            </div>
-          </template>
-
-          <div class="flex items-center justify-between mt-5">
-            <div class="text-lg text-right">
-              {{ Math.round(visitCountOutput) }}
+              <el-tag type="success">
+                <div class="text-lg text-right">
+                  {{ Math.round(orderNumOutput) }}
+                </div>
+              </el-tag>
             </div>
-            <svg-icon icon-class="visit" size="2em" />
-          </div>
-
-          <div
-            class="flex items-center justify-between mt-5 text-sm text-[var(--el-text-color-secondary)]"
-          >
-            <span> 总访客数 </span>
-            <span> {{ Math.round(visitCountOutput * 15) }} </span>
           </div>
         </el-card>
       </el-col>
@@ -84,25 +74,15 @@
       <!--消息数-->
       <el-col :xs="24" :sm="12" :lg="6">
         <el-card shadow="never">
-          <template #header>
+          <div class="flex items-center justify-between">
+            <span class="text-[var(--el-text-color-secondary)]">工单数</span>
             <div class="flex items-center justify-between">
-              <span class="text-[var(--el-text-color-secondary)]">IP数</span>
-              <el-tag type="success">日</el-tag>
-            </div>
-          </template>
-
-          <div class="flex items-center justify-between mt-5">
-            <div class="text-lg text-right">
-              {{ Math.round(dauCountOutput) }}
+              <el-tag type="success">
+                <div class="text-lg text-right">
+                  {{ Math.round(workOrderCountOutput) }}
+                </div>
+              </el-tag>
             </div>
-            <svg-icon icon-class="ip" size="2em" />
-          </div>
-
-          <div
-            class="flex items-center justify-between mt-5 text-sm text-[var(--el-text-color-secondary)]"
-          >
-            <span> 总IP数 </span>
-            <span> {{ Math.round(dauCountOutput) }} </span>
           </div>
         </el-card>
       </el-col>
@@ -110,25 +90,15 @@
       <!--销售额-->
       <el-col :xs="24" :sm="12" :lg="6">
         <el-card shadow="never">
-          <template #header>
+          <div class="flex items-center justify-between">
+            <span class="text-[var(--el-text-color-secondary)]">物料数</span>
             <div class="flex items-center justify-between">
-              <span class="text-[var(--el-text-color-secondary)]">产品数</span>
-              <el-tag>月</el-tag>
-            </div>
-          </template>
-
-          <div class="flex items-center justify-between mt-5">
-            <div class="text-lg text-right">
-              {{ Math.round(amountOutput) }}
+              <el-tag type="success">
+                <div class="text-lg text-right">
+                  {{ Math.round(materialCountOutput) }}
+                </div>
+              </el-tag>
             </div>
-            <svg-icon icon-class="money" size="2em" />
-          </div>
-
-          <div
-            class="flex items-center justify-between mt-5 text-sm text-[var(--el-text-color-secondary)]"
-          >
-            <span> 总产品数 </span>
-            <span> {{ Math.round(amountOutput * 15) }} </span>
           </div>
         </el-card>
       </el-col>
@@ -136,25 +106,15 @@
       <!--订单量-->
       <el-col :xs="24" :sm="12" :lg="6">
         <el-card shadow="never">
-          <template #header>
+          <div class="flex items-center justify-between">
+            <span class="text-[var(--el-text-color-secondary)]">设备数</span>
             <div class="flex items-center justify-between">
-              <span class="text-[var(--el-text-color-secondary)]">订单量</span>
-              <el-tag type="danger">季</el-tag>
-            </div>
-          </template>
-
-          <div class="flex items-center justify-between mt-5">
-            <div class="text-lg text-right">
-              {{ Math.round(orderCountOutput) }}
+              <el-tag type="success">
+                <div class="text-lg text-right">
+                  {{ Math.round(deviceCountOutput) }}
+                </div>
+              </el-tag>
             </div>
-            <svg-icon icon-class="order" size="2em" />
-          </div>
-
-          <div
-            class="flex items-center justify-between mt-5 text-sm text-[var(--el-text-color-secondary)]"
-          >
-            <span> 总订单量 </span>
-            <span> {{ Math.round(orderCountOutput * 15) }} </span>
           </div>
         </el-card>
       </el-col>
@@ -162,42 +122,46 @@
 
     <!-- Echarts 图表 -->
     <el-row :gutter="10" class="mt-3">
-      <el-col :sm="24" :lg="8" class="mb-2">
+      <el-col :sm="24" :lg="24" class="mb-2">
         <BarChart
           id="barChart"
           height="400px"
           width="100%"
           class="bg-[var(--el-bg-color-overlay)]"
+          :indexSum="indexSum"
         />
       </el-col>
 
-      <el-col :xs="24" :sm="12" :lg="8" class="mb-2">
+<!--      <el-col :xs="24" :sm="12" :lg="12" class="mb-2">
         <PieChart
           id="pieChart"
           height="400px"
           width="100%"
-          class="bg-[var(--el-bg-color-overlay)]"
+          class="bg-[var(&#45;&#45;el-bg-color-overlay)]"
         />
-      </el-col>
+      </el-col>-->
 
-      <el-col :xs="24" :sm="12" :lg="8" class="mb-2">
+<!--      <el-col :xs="24" :sm="12" :lg="8" class="mb-2">
         <RadarChart
           id="radarChart"
           height="400px"
           width="100%"
-          class="bg-[var(--el-bg-color-overlay)]"
+          class="bg-[var(&#45;&#45;el-bg-color-overlay)]"
         />
-      </el-col>
+      </el-col>-->
     </el-row>
   </div>
 </template>
 
 <script setup lang="ts">
+import * as echarts from "echarts";
+
 defineOptions({
   name: "Dashboard",
   inheritAttrs: false,
 });
 
+import {queryIndex} from "@/api/process"
 import { useUserStore } from "@/store/modules/user";
 import { useTransition, TransitionPresets } from "@vueuse/core";
 
@@ -209,49 +173,56 @@ const greetings = computed?.(() => {
   if (hours >= 6 && hours < 8) {
     return "晨起披衣出草堂,轩窗已自喜微凉🌅!";
   } else if (hours >= 8 && hours < 12) {
-    return "上午好!";
+    return "上午的阳光,如细丝般穿透云层,轻轻拂过沉睡的大地,唤醒万物生机。";
   } else if (hours >= 12 && hours < 18) {
-    return "下午好!";
+    return "当下午的阳光悄悄的倾斜,天空被渲染上了一层淡金的色彩,这时的世界是如此的宁静与和谐,让人心生向往。";
   } else if (hours >= 18 && hours < 24) {
-    return "晚上好!";
+    return "夜晚的美丽如同黑色的丝绸,神秘而深邃,繁星如明珠般镶嵌在天空,月光如同一把柔和的画笔,描绘出了一幅宁静致远的画卷。";
   } else if (hours >= 0 && hours < 6) {
     return "偷偷向银河要了一把碎星,只等你闭上眼睛撒入你的梦中,晚安🌛!";
   }
 });
 
+
+const indexSum = ref(null)
 const duration = 5000;
 
 // 销售额
-const amount = ref(0);
-const amountOutput = useTransition(amount, {
+const orderCount = ref(0);
+const orderNumOutput = useTransition(orderCount, {
   duration: duration,
   transition: TransitionPresets.easeOutExpo,
 });
-amount.value = 2000;
 
 // 访客数
-const visitCount = ref(0);
-const visitCountOutput = useTransition(visitCount, {
+const workOrderCount = ref(0);
+const workOrderCountOutput = useTransition(workOrderCount, {
   duration: duration,
   transition: TransitionPresets.easeOutExpo,
 });
-visitCount.value = 2000;
 
 // IP数
-const dauCount = ref(0);
-const dauCountOutput = useTransition(dauCount, {
+const materialCount = ref(0);
+const materialCountOutput = useTransition(materialCount, {
   duration: duration,
   transition: TransitionPresets.easeOutExpo,
 });
-dauCount.value = 2000;
 
 // 订单量
-const orderCount = ref(0);
-const orderCountOutput = useTransition(orderCount, {
+const deviceCount = ref(0);
+const deviceCountOutput = useTransition(deviceCount, {
   duration: duration,
   transition: TransitionPresets.easeOutExpo,
 });
-orderCount.value = 2000;
+onMounted(() => {
+  queryIndex().then((res)=>{
+    deviceCount.value = res.data.deviceNum
+    orderCount.value = res.data.orderNum
+    workOrderCount.value = res.data.workOrderNum
+    materialCount.value = res.data.materialNum
+    indexSum.value = res.data
+  });
+});
 </script>
 
 <style lang="scss" scoped>