Browse Source

试运行更改

qinhb 2 tháng trước cách đây
mục cha
commit
dd9a5e2b2c

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

@@ -98,6 +98,14 @@ export function updateFault(data:Object) {
   });
 }
 
+export function handleProblem(data:Object) {
+  return request({
+    url: "/api/v1/process/escalationFault/problemHandle",
+    method: "post",
+    data:data,
+  });
+}
+
 /**
  * 获取不合格品审理单二维码
  *
@@ -109,4 +117,4 @@ export function getFaultScanCode(id: Number): AxiosPromise<any> {
     url: "/api/v1/process/escalationFault/scan/" + id,
     method: "get",
   });
-}
+}

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

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

+ 3 - 2
src/layout/components/NavBar/components/NavbarRight.vue

@@ -128,10 +128,8 @@ const options = ref({});
 const loading = ref(false);
 const tagsViewStore = useTagsViewStore();
 const userStore = useUserStore();
-const settingStore = useSettingsStore();
 const unReadMessageNum = ref(null);
 const getHeader = computed(() => {
-  let url = import.meta.env.VITE_APP_UPLOAD_URL + userStore.user.avatar;
   return import.meta.env.VITE_APP_UPLOAD_URL + userStore.user.avatar;
 });
 const route = useRoute();
@@ -150,6 +148,9 @@ const clickItem =(row) =>{
   if(row.msgId === '3'){
     window.open("/quality/faultHandle",'_blank')
   }
+  if(row.msgId === '6'){
+    window.open("/quality/problemHandle",'_blank')
+  }
   if(row.msgId === '4'){
     window.open("/outsource",'_blank')
   }

+ 1 - 1
src/views/base/craftManagement/process/index.vue

@@ -302,7 +302,7 @@ option.value = Object.assign(option.value, {
       ],
     },
     {
-      label: "是否可跳过",
+      label: "前置完工",
       prop: "skipped",
       span: 8,
       hide: true,

+ 1 - 1
src/views/base/craftManagement/route/bindConfig.ts

@@ -169,7 +169,7 @@ export const formOption = {
       value: 0,
     },*/
     {
-      label: "是否可跳过",
+      label: "前置完工",
       prop: "skipped",
       span: 24,
       type: "switch",

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

@@ -19,7 +19,7 @@
         <el-tag v-if="row.usable == '1'" type="success">已绑定</el-tag>
         <el-tag v-else type="info">未绑定</el-tag>
       </template>
-      <template #menu-left="{ size }">
+<!--      <template #menu-left="{ size }">
         <el-button
           :disabled="toDeleteIds.length < 1"
           type="refresh"
@@ -28,7 +28,7 @@
           @click="apsSync"
           >APS同步</el-button
         >
-      </template>
+      </template>-->
       <!-- :disabled="row.usable == '1' ? false : true" -->
       <template #menu-right="{}">
         <el-dropdown split-button

+ 2 - 2
src/views/base/materials/index.vue

@@ -25,14 +25,14 @@
           @click="multipleDelete"
           >删除</el-button
         >
-        <el-button
+<!--        <el-button
           :disabled="toDeleteIds.length < 1"
           type="refresh"
           icon="el-icon-refresh"
           :size="size"
           @click="apsSync"
           >APS同步</el-button
-        >
+        >-->
       </template>
       <template #menu="{ row, index, type }">
         <el-button @click="binding(row)" text type="primary"

+ 2 - 2
src/views/base/modeling/station/index.vue

@@ -38,14 +38,14 @@
           @click="multipleDelete"
           >删除</el-button
         >
-        <el-button
+<!--        <el-button
             :disabled="toDeleteIds.length < 1"
             type="refresh"
             icon="el-icon-refresh"
             :size="size"
             @click="apsSync"
         >APS同步</el-button
-        >
+        >-->
       </template>
       <template #menu="{ row, index, type }">
         <el-button @click="binding(row)" text type="primary"

+ 38 - 80
src/views/plan/order/index.vue

@@ -19,6 +19,7 @@
       @row-del="rowDel"
     >
       <template #menu-left="{ size }">
+        <el-button type="primary"  icon="el-icon-plus" @click="handleAdd">新增</el-button>
         <el-button type="primary" @click="scan">扫码导入</el-button>
         <el-button type="primary" @click="test">测试数据</el-button>
       </template>
@@ -54,25 +55,17 @@
           v-if="
             row.orderState === '0' ||
             row.orderState === '1' ||
-            row.orderState === '2'
+            row.orderState === '2' ||
+            row.orderState === '3'
           "
           v-hasPerm="[buttonPermission.PLAN.BTNS.order_edit]"
           link
           size="small"
           type="primary"
-          @click="handleEdit(row, 0)"
-        >
+          @click="handleEdit(row, 0)">
           <i-ep-edit />
           编辑
         </el-button>
-        <!--        <el-button
-            v-if="row.nameplated === 1"
-            type="info"
-            link
-            size="small"
-            @click="handleNameplated(row)"
-        ><i-ep-edit />铭牌
-        </el-button>-->
         <el-button
           v-if="
             row.orderState === '0' ||
@@ -358,6 +351,7 @@ option.value = {
   searchIndex: 3,
   searchIcon: true,
   editBtn: false,
+  addBtn: false,
   delBtn: false,
   searchMenuSpan: 8,
   labelWidth: 100,
@@ -405,13 +399,6 @@ option.value = {
         },
       ],
     },
-   /* {
-      label: "计划单号",
-      prop: "planCode",
-      search: true,
-      width: 130,
-      overHidden: true,
-    },*/
     {
       label: "订单类型",
       prop: "orderType",
@@ -433,33 +420,28 @@ option.value = {
           trigger: "trigger",
         },
       ],
-      change: ({ value, column }) => {
-        if (value === "2") {
-          option.value.column.forEach((item) => {
+      change: ({ value, column ,row}) => {
+        option.value.column.forEach((item) => {
+          if(value === "2"){
             if (item.prop == "trackingNumber") {
               item.display = true;
             }
-            if (item.prop == "materialCode") {
+            if (item.prop == "materialCode" || item.prop == "orderNum") {
               item.disabled = true;
             }
-            if (item.prop == "orderNum") {
-              item.disabled = true;
-            }
-          });
-        }
-        if (value === "1") {
-          option.value.column.forEach((item) => {
+          }else if(value === "1"){
             if (item.prop == "trackingNumber") {
               item.display = false;
             }
-            if (item.prop == "materialCode") {
-              item.disabled = false;
-            }
-            if (item.prop == "orderNum") {
+            if (item.prop == "materialCode" || item.prop == "orderNum") {
               item.disabled = false;
             }
-          });
-        }
+          }
+          if(item.tagStr === 1 && (item.prop == "materialCode" || item.prop == "orderNum")){
+            delete item.disabled;
+            delete item.disabled
+          }
+        });
       },
     },
     {
@@ -528,24 +510,6 @@ option.value = {
       disabled: true,
       prop: "materialModel",
     },
-   /* {
-      label: "工作令号",
-      width: 130,
-      overHidden: true,
-      prop: "workOrder",
-    },*/
-  /*  {
-      label: "部(组)件代号",
-      width: 130,
-      overHidden: true,
-      prop: "assemblyCode",
-    },
-    {
-      label: "部(组)件名称",
-      width: 130,
-      overHidden: true,
-      prop: "assemblyName",
-    },*/
     {
       label: "订单状态",
       prop: "orderState",
@@ -554,8 +518,7 @@ option.value = {
       overHidden: true,
       search: true,
       type: "select", //类型为下拉选择框
-      dicUrl:
-        dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_state,
+      dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_state,
       props: {
         label: "dictLabel",
         value: "dictValue",
@@ -628,25 +591,6 @@ option.value = {
         return time.getTime() < new Date().setDate(new Date().getDate() - 1);
       },
     },
-    /* {
-      label: "所属公司",
-      prop: "companyId",
-      width: 100,
-      overHidden: true,
-      type: "select", //类型为下拉选择框
-      dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dept/orgList",
-      props: {
-        label: "deptName",
-        value: "id",
-      },
-      rules: [
-        {
-          required: true,
-          message: "请选择所属公司",
-          trigger: "trigger",
-        },
-      ],
-    },*/
     {
       label: "项目号",
       width: 100,
@@ -732,8 +676,6 @@ function useScan() {
   };
   const scanFnc = () => {
     if (scanCode.value) {
-      // scanCode.value =
-      //   '{"id":"453b5261e07745f2b7f4a042171f0644","tp":"10","cp":"1", "data":"PD94bWwgdmVyc2lvbj0iMS4wliBlbmNvZGluZz0iROlyMzEylj8+PFI+PERBIEIEPSJhc2QyMzRhZGYzNDJkZGZhc3NzliBOcDOiNSlgY3A9liEiPjxsaXN0IE5hPSJCT00iPjxCT00gdHk9lkkiPjxBPuS6p+WTgeWei+WPtzQT48Qj7lm77li7c8L0|+PEM+5qOA6agM5L6d5o2uPC9DPjxUSj"}';
       let obj = {};
       obj = JSON.parse(scanCode.value);
       if (!_.includes(scanCpArray.value, obj.cp)) {
@@ -845,9 +787,7 @@ const rowUpdate = (form: any, index: any, done: any, loading: any) => {
     handleQuery(null, null);
   });
 };
-const handleNameplated = (row) => {
-  ElMessage.warning("功能开发中");
-};
+
 const rowDel = (form: any, index) => {
   ElMessageBox.confirm("当前操作会删除数据,你确认要继续吗?")
     .then(() => {
@@ -898,8 +838,26 @@ const downloadTemplateExcel = () => {
     });
   }
 };
-
+const handleAdd = () => {
+  option.value.column.forEach((item)=>{
+    item.tagStr = 0;
+  })
+  crudRef.value && crudRef.value.rowAdd();
+};
 const handleEdit = (row: any, index: any) => {
+  option.value.column.forEach((item)=>{
+    item.tagStr = 0;
+    if(row.orderState === '3'){
+      item.tagStr = 1;
+      if(item.prop === 'deliverTime'){
+        item.editDisabled = false
+      }else{
+        item.editDisabled = true
+      }
+    }else{
+      item.editDisabled = false
+    }
+  })
   crudRef.value && crudRef.value.rowEdit(row, index);
 };
 /** 弹窗提交 */

+ 3 - 3
src/views/plan/prepare/index.vue

@@ -91,7 +91,7 @@
     <el-dialog
       v-model="dialog1.visible"
       :title="dialog1.title"
-      width="45%"
+      width="50%"
       @close="dialog1.visible = false"
     >
       <el-form ref="dataFormRef" :model="form" label-width="90px">
@@ -160,7 +160,7 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="7">
             <el-form-item label="准备人员">
               <el-select
                 v-model="templates[index].userName"
@@ -181,7 +181,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="9">
             <el-form-item label="完成时间" v-if="templates[index].time">
               {{ templates[index].time }}
             </el-form-item>

+ 184 - 0
src/views/plan/track/index.vue

@@ -0,0 +1,184 @@
+<template>
+  <div class="mainContentBox">
+    <avue-crud
+      ref="crudRef"
+      v-model:search="search"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+      @row-save="createRow"
+      @row-update="updateRow"
+      @row-del="deleteRow"
+      @search-change="searchChange"
+      @search-reset="resetChange"
+      @size-change="dataList"
+      @current-change="dataList"
+      @selection-change="selectionChange"
+    />
+  </div>
+</template>
+<script setup>
+import { ref } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import dictDataUtil from "@/common/configs/dictDataUtil";
+import { useDictionaryStore } from "@/store";
+
+// 数据字典相关
+const { dicts } = useDictionaryStore();
+
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    src: "/api/v1/plan/task/track",
+  });
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+  Methords; //增删改查
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+const stationList = ref([]);
+const userList = ref([]);
+const charts = shallowRef(null);
+onMounted(() => {
+  dataList();
+});
+
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  searchEnter: true,
+  selection: true,
+  menu: false,
+  menuWidth: 160,
+  searchLabelWidth: 120,
+  addBtn: false,
+  filterBtn: false,
+  searchShowBtn: false,
+  columnBtn: false,
+  gridBtn: false,
+  editBtn: false,
+  viewBtn: false,
+  delBtn: false,
+  column: [
+    {
+      label: "管号",
+      prop: "seqNo",
+      editDisabled: true,
+      search: true,
+    },
+    {
+      label: "工位名称",
+      prop: "stationName",
+      search: true,
+      display: false,
+    },
+    {
+      label: "工位名称",
+      hide: true,
+      editDisabled: false,
+      type: "select",
+      dicData: stationList,
+      filterable: true,
+      prop: "stationId",
+      props: { label: "name", value: "id" },
+      rules: [
+        {
+          required: true,
+          message: "请选择工位名称",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "订单编码",
+      prop: "orderCode",
+      search: true,
+      width: 125,
+      editDisabled: true,
+    },
+    {
+      label: "工单编码",
+      prop: "workOrderCode",
+      search: true,
+      width: 125,
+      editDisabled: true,
+    },
+    {
+      label: "产线名称",
+      prop: "productLineName",
+      search: true,
+      editDisabled: true,
+    },
+    {
+      label: "工艺路线",
+      prop: "routeName",
+      editDisabled: true,
+    },
+    {
+      label: "物料编号",
+      prop: "materialCode",
+      search: true,
+      editDisabled: true,
+    },
+    {
+      label: "物料名称",
+      prop: "materialName",
+      search: true,
+      editDisabled: true,
+    },
+    {
+      label: "物料规格",
+      prop: "materialModel",
+      editDisabled: true,
+      search: true,
+    },
+    {
+      label: "当前工序编码",
+      prop: "operationCode",
+      search: true,
+      editDisabled: true,
+    },
+    {
+      label: "当前工序名称",
+      prop: "operationName",
+      search: true,
+      editDisabled: true,
+    },
+    {
+      label: "排序",
+      prop: "operationSort",
+      editDisabled: true,
+      formatter: (val) => {
+        return val.operationSort + 1;
+      },
+      width: 60,
+    },
+    {
+      label: "状态",
+      prop: "state",
+      type: "select",
+      width: 80,
+      editDisabled: true,
+      dicUrl:
+        dictDataUtil.request_url + dictDataUtil.TYPE_CODE.station_task_state,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+    },
+  ],
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.avue-crud__left) {
+  width: 100%;
+}
+
+#charts {
+  width: 100%;
+  height: 300px;
+  border: 1px solid #ccc;
+}
+</style>

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

@@ -39,14 +39,14 @@
             <svg-icon icon-class="paicheng" />
           </template>
         </el-button>
-        <el-button
+<!--        <el-button
             :disabled="toDeleteIds.length < 1"
             type="refresh"
             icon="el-icon-refresh"
             :size="size"
             @click="apsSync"
         >APS同步</el-button
-        >
+        >-->
       </template>
       <template #menu="{ size, row, index }">
         <el-button
@@ -58,7 +58,7 @@
           "
           type="primary"
           link
-          size="small"
+          :size="size"
           @click="handleEdit(row, 0)"
           ><i-ep-edit />编辑
         </el-button>
@@ -384,7 +384,7 @@ const aps = (id,state) => {
   apsType.value = 0;
   formData.workOrderIds = [id];
   dialog5.visible = true;
-  formData.apsModel = null
+  formData.apsModel = '1'
   apsDisabled.value = []
   if(state === '0' || state === '1' || state === '2' || state === '3'){
     apsDisabled.value = ['2']

+ 1 - 1
src/views/pro/baseoperation/index.vue

@@ -182,7 +182,7 @@
                     search: false,
                 },
                 {
-                    label: "是否可跳过",
+                    label: "前置完工",
                     prop: "skipped",
                     search: false,
                 },

+ 9 - 0
src/views/pro/traceability/components/faultCom.vue

@@ -79,6 +79,15 @@ option.value = Object.assign(option.value, {
       },
     },
     {
+      label: "类型",
+      prop: "type",
+      dicData: [{"dictLabel": "报故","dictValue": 0},{"dictLabel": "问题反馈","dictValue": 1}],
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+    },
+    {
       label: "报故人",
       prop: "creator",
       search: false,

+ 1 - 1
src/views/quality/faultHandle/index.vue

@@ -201,7 +201,7 @@ const viewFault = (row) => {
 };
 onMounted(() => {
   // console.log("crudRef", crudRef)
-
+  search.value.type = '0'
   search.value.id = route.query.id;
   search.value.state = radio1.value;
   dataList();

+ 218 - 0
src/views/quality/problemHandle/components/problem-detail.vue

@@ -0,0 +1,218 @@
+<template>
+  <div class="fault" v-if="faultDetails1!=null">
+    <div class="title-fault">
+      产品名称:&nbsp;&nbsp;{{ faultDetails1.materialName }}
+    </div>
+    <div class="title-fault">
+      产品编码:&nbsp;&nbsp;{{ faultDetails1.materialCode }}
+    </div>
+  </div>
+
+  <div class="fault" v-if="faultDetails1!=null">
+    <div class="fault-detail">序列号 :&nbsp;&nbsp;{{ faultDetails1.seqNo }}</div>
+    <div class="fault-detail" v-if="faultDetails1.remark!=''">故障描述 :&nbsp;&nbsp;{{ faultDetails1.remark }}</div>
+    <div class="fault-detail" v-if="faultDetails1.opinion!=''">线长意见 :&nbsp;&nbsp;{{ faultDetails1.opinion }}</div>
+
+    <div class="title-fault" style="margin-top: 10px">
+      反馈人:&nbsp;&nbsp;{{ faultDetails1.creator }}
+    </div>
+    <div class="title-fault" style="margin-top: 10px">
+      反馈工位:&nbsp;&nbsp;{{ faultDetails1.stationName }}
+    </div>
+    <div class="title-fault" style="margin-top: 10px">
+      反馈数量:&nbsp;&nbsp;{{ faultDetails1.unqualifiedNum }}
+    </div>
+  </div>
+  <div class="mainContentBox" v-if="faultDetails1!=null&&faultDetails1.currentState==5">
+    <avue-crud
+        ref="formRef"
+        v-model="form"
+        :data="data2"
+        :option="option2"
+    >
+    </avue-crud>
+  </div>
+</template>
+<script setup>
+import {ref} from "vue";
+import {useCrud} from "@/hooks/userCrud";
+import {useCommonStoreHook, useDictionaryStore} from "@/store";
+import {getFault, getFaultDetails, getSeqNoList} from "@/api/fault"
+import dictDataUtil from "@/common/configs/dictDataUtil";
+
+const {isShowTable, tableType} = toRefs(useCommonStoreHook());
+// 数据字典相关
+const {dicts} = useDictionaryStore();
+
+const test = () => {
+  isShowTable.value = true;
+  tableType.value = tableType.value == 1 ? 2 : 1;
+};
+const props = defineProps({
+  escalationFaultId: {
+    type: String,
+    default: () => {
+      return 0;
+    }
+  },
+  dialog: {
+    type: Object,
+    default: () => {
+      return {};
+    }
+  }
+})
+const url = ref({});
+const srcList = ref([]);
+const drawingDetail = ref(null);
+const drawing = (row) => {
+  drawingDetail.value = row;
+  dialog.visible = true;
+}
+// 传入一个url,后面不带/
+const {form, data, option, search, page, toDeleteIds, Methords, Utils} =
+    useCrud({
+      src: "/api/v1/process/escalationDefects",
+    });
+const {dataNoPageList, createRow, updateRow, deleteRow, searchChange, resetChange} =
+    Methords; //增删改查
+const {selectionChange, multipleDelete} = Methords; //选中和批量删除事件
+const {checkBtnPerm, downloadTemplate, exportData} = Utils; //按钮权限等工具
+// checkBtnPerm(ButtonPermKeys.PLAN.BTNS.order_add) :permission="permission"
+// const permission = reactive({
+//   delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
+//   addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
+//   editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
+//   menu: true,
+// });
+
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+const router = useRouter();
+
+
+const formData1 = ref({});
+const data2 = ref([]);
+const option2 = ref([]);
+const formFault = ref({});
+const faultDetails1 = ref(null);
+onMounted(() => {
+  // console.log("crudRef", crudRef)
+  search.value.escalationFaultId = props.escalationFaultId;
+  dataNoPageList();
+  formData1.value.escalationFaultId = props.escalationFaultId;
+  formFault.value.escalationFaultId = props.escalationFaultId;
+  getFault(formData1.value).then((data) => {
+
+
+    if (data.data.length > 0) {
+      url.value = dictDataUtil.img_url + data.data[0].fileUrl;
+      for (let i = 0; i < data.data.length; i++) {
+        srcList.value[i] = dictDataUtil.img_url + data.data[i].fileUrl;
+      }
+    }
+
+  });
+  getFaultDetails(props.escalationFaultId).then((data) => {
+
+    faultDetails1.value = data.data;
+    if (dicts.disposal_measures_type.length > 0) {
+
+      for (let i = 0; i < dicts.disposal_measures_type.length; i++) {
+        if (faultDetails1.value.disposalMeasures === dicts.disposal_measures_type[i].dictValue) {
+          faultDetails1.value.disposalMeasures = dicts.disposal_measures_type[i].dictLabel;
+        }
+      }
+    }
+    getSeqNoList(formFault.value).then((data) => {
+
+      data2.value = data.data;
+      for (let i = 0; i < data2.value.length; i++) {
+        data2.value[i].$cellEdit = true;
+      }
+    });
+  });
+
+
+});
+
+
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  menu: false,
+  columnBtn: false,
+  gridBtn: false,
+  column: [
+    {
+      label: "缺陷大类",
+      prop: "bugType",
+      dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.defect_mana,
+      props: {label: "dictLabel", value: "dictValue"},
+    },
+    {
+      label: "缺陷小类",
+      prop: "bugName",
+    },
+  ],
+});
+
+
+// 设置表格列或者其他自定义的option
+option2.value = {
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  menu: false,
+  columnBtn: false,
+  gridBtn: false,
+  refreshBtn: false,
+  column: [
+    {
+      label: "跟踪卡号",
+      prop: "seqNo",
+    },
+    {
+      label: "返工工序/报废",
+      prop: "reworkOperationName",
+      type: "select",
+    },
+  ],
+};
+
+</script>
+<style>
+.title-fault {
+  float: left;
+  width: 300px;
+}
+
+.fault {
+  margin-left: 15px;
+  margin-top: 10px;
+  display: block;
+  overflow: hidden;
+}
+
+.fault-image {
+  width: 150px;
+  float: left;
+  margin-left: 10px;
+  overflow: hidden;
+}
+
+.image-title {
+  margin-bottom: 15px;
+}
+
+.fault-img {
+  display: inline-block;
+}
+
+.fault-detail {
+  margin-top: 20px;
+}
+</style>

+ 158 - 0
src/views/quality/problemHandle/components/problem-examine.vue

@@ -0,0 +1,158 @@
+<template>
+  <div class="fault" v-if="faultDetails1!=null">
+    <div class="title-fault">
+      产品名称:&nbsp;&nbsp;{{ faultDetails1.materialName }}
+    </div>
+    <div class="title-fault">
+      产品编码:&nbsp;&nbsp;{{ faultDetails1.materialCode }}
+    </div>
+  </div>
+
+  <div class="fault" v-if="faultDetails1!=null">
+    <div class="fault-detail">序列号:&nbsp;&nbsp;{{ faultDetails1.seqNo }}</div>
+    <div class="fault-detail">反馈问题:&nbsp;&nbsp;{{ faultDetails1.remark }}</div>
+
+    <div class="title-fault" style="margin-top: 10px">
+      反馈人:&nbsp;&nbsp;{{ faultDetails1.creator }}
+    </div>
+    <div class="title-fault" style="margin-top: 10px">
+      反馈工位:&nbsp;&nbsp;{{ faultDetails1.stationName }}
+    </div>
+    <div class="title-fault" style="margin-top: 10px">
+      反馈数量量:&nbsp;&nbsp;{{ faultDetails1.unqualifiedNum }}
+    </div>
+  </div>
+  <div class="fault" v-if="faultDetails1!=null" style="margin-top: 15px;margin-bottom: 15px">
+    <el-input
+        type="textarea"
+        :autosize="{ minRows: 3, maxRows: 6}"
+        placeholder="请输入处理意见"
+        v-model="textarea2"
+    >
+    </el-input>
+  </div>
+  <div style="overflow: hidden">
+    <div class="detail-footer">
+      <el-button type="primary" @click="onHandle"> 确定</el-button>
+      <el-button @click="cancelWindow">取消</el-button>
+    </div>
+  </div>
+
+</template>
+<script setup>
+import {ref} from "vue";
+import {useCrud} from "@/hooks/userCrud";
+import {useCommonStoreHook, useDictionaryStore} from "@/store";
+import {getFaultDetails, handleProblem} from "@/api/fault"
+
+const {isShowTable, tableType} = toRefs(useCommonStoreHook());
+// 数据字典相关
+const {dicts} = useDictionaryStore();
+
+const test = () => {
+  isShowTable.value = true;
+  tableType.value = tableType.value == 1 ? 2 : 1;
+};
+const props = defineProps({
+  escFaultId: {
+    type: String,
+    default: () => {
+      return 0;
+    }
+  },
+  dialogPs: {
+    type: Object,
+    default: () => {
+      return {};
+    }
+  },
+})
+
+// 传入一个url,后面不带/
+const {form, data, option, search, page, toDeleteIds, Methords, Utils} =
+    useCrud({
+      src: "/api/v1/process/escalationDefects",
+    });
+const {dataNoPageList, createRow, updateRow, deleteRow, searchChange, resetChange} =
+    Methords; //增删改查
+const {selectionChange, multipleDelete} = Methords; //选中和批量删除事件
+const {checkBtnPerm, downloadTemplate, exportData} = Utils; //按钮权限等工具
+
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+const router = useRouter();
+const radio1 = ref("6");
+const formData1 = ref({});
+const faultDetails1 = ref(null);
+const textarea2 = ref('');
+onMounted(() => {
+  // console.log("crudRef", crudRef)
+  search.value.escalationFaultId = props.escFaultId;
+  dataNoPageList();
+  formData1.value.escalationFaultId = props.escFaultId;
+  getFaultDetails(props.escFaultId).then((data) => {
+    faultDetails1.value = data.data;
+    for (let i = 0; i < dicts.disposal_measures_type.length; i++) {
+      if (faultDetails1.value.disposalMeasures === dicts.disposal_measures_type[i].dictValue) {
+        faultDetails1.value.disposalMeasures = dicts.disposal_measures_type[i].dictLabel;
+      }
+    }
+  });
+
+});
+
+const onHandle = () => {
+  if (!textarea2.value) {
+    ElMessage({
+      message: "请输入处理意见",
+      type: "error",
+    });
+    return;
+  }
+  const updateFaultData = ref({id: faultDetails1.value.id, currentState: radio1.value, opinion: textarea2.value});
+  handleProblem(updateFaultData.value).then(
+      (data) => {
+        if (data.code === "200") {
+          ElMessage({
+            message: data.msg,
+            type: "success",
+          });
+          props.dialogPs.visible = false;
+          dataList();
+        } else {
+          ElMessage({
+            message: data.msg,
+            type: "error",
+          });
+        }
+      }
+  )
+}
+
+
+const cancelWindow = () => {
+  props.dialogPs.visible = false;
+}
+</script>
+<style>
+.title-fault {
+  float: left;
+  width: 300px;
+}
+
+.fault {
+  margin-left: 15px;
+  margin-top: 10px;
+  display: block;
+  overflow: hidden;
+}
+
+
+.fault-detail {
+  margin-top: 20px;
+}
+
+.detail-footer {
+  float: right;
+  overflow: hidden;
+}
+</style>

+ 201 - 0
src/views/quality/problemHandle/index.vue

@@ -0,0 +1,201 @@
+<template>
+  <div class="mainContentBox">
+    <avue-crud
+        ref="crudRef"
+        v-model:search="search"
+        v-model="form"
+        :data="data"
+        :option="option"
+        v-model:page="page"
+        @row-save="createRow"
+        @row-update="updateRow"
+        @row-del="deleteRow"
+        @search-change="searchChange"
+        @search-reset="resetChange"
+        @size-change="dataList"
+        @current-change="dataList"
+        @selection-change="selectionChange"
+    >
+      <template #menu-left>
+        <el-radio-group
+            v-model="radio1"
+            size="large"
+            @change="searchChangeState"
+        >
+          <el-radio-button label="未完成" value="1"/>
+          <el-radio-button label="已完成" value="3"/>
+        </el-radio-group>
+      </template>
+      <template #menu="{ row, index, type }">
+        <el-button
+            @click="viewFault(row)"
+            icon="el-icon-view"
+            text
+            type="primary"
+        >查看
+        </el-button
+        >
+
+        <el-button
+            @click="faultThaw(row)"
+            text
+            v-if="row.state !== '3'"
+            type="primary"
+        >处理
+          <template #icon>
+            <svg-icon icon-class="jiedong"></svg-icon>
+          </template>
+        </el-button>
+      </template>
+    </avue-crud>
+
+    <el-dialog
+        v-model="dialog.visible"
+        :title="dialog.title"
+        width="900px"
+        @close="dialog.visible = false"
+        :destroy-on-close="true"
+    >
+      <problem-detail :escalationFaultId="fault.id" :dialog="dialog"/>
+    </el-dialog>
+
+    <el-dialog
+        v-model="dialog3.visible"
+        :title="dialog3.title"
+        width="900px"
+        @close="closeFault"
+        :destroy-on-close="true"
+    >
+      <problem-examine :escFaultId="faultExa.id" :dialogPs="dialog3"/>
+    </el-dialog>
+  </div>
+</template>
+<script setup>
+import {ref} from "vue";
+import {useCrud} from "@/hooks/userCrud";
+import dictDataUtil from "@/common/configs/dictDataUtil";
+import {useCommonStoreHook, useDictionaryStore} from "@/store";
+
+const {isShowTable, tableType} = toRefs(useCommonStoreHook());
+// 数据字典相关
+const {dicts} = useDictionaryStore();
+
+const test = () => {
+  isShowTable.value = true;
+  tableType.value = tableType.value == 1 ? 2 : 1;
+};
+const dialog = ref({
+  title: "报故详情",
+  visible: false,
+});
+const dialog3 = ref({
+  title: "反馈处理",
+  visible: false,
+});
+
+const fault = ref({});
+const faultExa = ref({});
+const faultThaw = (row) => {
+  faultExa.value.id = row.id;
+  dialog3.value.visible = true;
+};
+const closeFault = () => {
+  dialog3.value.visible = false;
+  dataList();
+};
+// 传入一个url,后面不带/
+const {form, data, option, search, page, toDeleteIds, Methords, Utils} =
+    useCrud({
+      src: "/api/v1/process/escalationFault",
+    });
+const {dataList, createRow, updateRow, deleteRow, searchChange, resetChange} =
+    Methords; //增删改查
+const {selectionChange, multipleDelete} = Methords; //选中和批量删除事件
+const {checkBtnPerm, downloadTemplate, exportData} = Utils; //按钮权限等工具
+
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+const router = useRouter();
+const route = useRoute();
+const viewFault = (row) => {
+  fault.value.id = row.id;
+  console.info(fault);
+  dialog.value.visible = true;
+};
+onMounted(() => {
+  // console.log("crudRef", crudRef)
+  search.value.type = '1'
+  search.value.id = route.query.id;
+  search.value.state = radio1.value;
+  dataList();
+});
+
+const searchChangeState = () => {
+  search.value.state = radio1.value;
+  dataList();
+};
+
+const radio1 = ref("1");
+
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  column: [
+    {
+      label: "工单号",
+      prop: "workOrderCode",
+      overHidden: true,
+      search: true,
+    },
+    {
+      label: "订单编号",
+      prop: "orderCode",
+      overHidden: true,
+      width: 120,
+      search: true,
+    },
+    {
+      label: "反馈数量",
+      overHidden: true,
+      width: 100,
+      prop: "unqualifiedNum",
+    },
+    {
+      label: "物料编码",
+      prop: "materialCode",
+      overHidden: true,
+    },
+    {
+      label: "产品名称",
+      prop: "materialName",
+      overHidden: true,
+      width: 100,
+    },
+
+    {
+      label: "流转卡号",
+      prop: "seqNo",
+      overHidden: true,
+      search: true,
+    },
+    {
+      label: "状态",
+      prop: "state",
+      overHidden: true,
+      width: 120,
+      dicUrl:
+          dictDataUtil.request_url +
+          dictDataUtil.TYPE_CODE.escalation_fault_state,
+      props: {label: "dictLabel", value: "dictValue"},
+    },
+    {
+      label: "反馈人",
+      prop: "creator",
+      overHidden: true,
+      width: 100,
+    },
+  ],
+});
+</script>

+ 0 - 3
src/views/storage/task/index.vue

@@ -289,7 +289,6 @@ const option2 = {
       label: "仓库编码",
       prop: "vehicle",
       type: "select",
-      width: 90,
       overHidden: true,
       editDisabled: true,
       dicUrl:
@@ -303,12 +302,10 @@ const option2 = {
     {
       label: "货区",
       prop: "remark",
-      width: 90,
       editDisabled: true,
     },
     {
       label: "货位",
-      width: 90,
       prop: "code",
     },
     {

+ 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>