Forráskód Böngészése

消息指派修改

dengyu 5 hónapja
szülő
commit
7255770ba2
3 módosított fájl, 18 hozzáadás és 7 törlés
  1. 18 4
      src/components/AddMsg/index.vue
  2. 0 2
      src/utils/common.ts
  3. 0 1
      src/views/process/orders.vue

+ 18 - 4
src/components/AddMsg/index.vue

@@ -27,6 +27,7 @@
               v-model="form.workOrderCode"
               :disabled="route.name != 'ProcessMain'"
               placeholder="Select"
+              filterable
               @change="getType"
             >
               <el-option
@@ -90,6 +91,7 @@ import { sendMsg, getStationType } from "@/api/process";
 import { emitter, EventsNames } from "@/utils/common";
 import { useDictionaryStore } from "@/store";
 import { useProcessStore } from "@/store/modules/processView";
+import { getOrders } from "@/api/process";
 const dictS = useDictionaryStore();
 const store = useProcessStore();
 const route = useRoute();
@@ -134,12 +136,24 @@ const submit = async () => {
     checkPop.value = false;
   }
 };
+const getOrdersData = async () => {
+  const { code, data } = await getOrders({
+    pageNo: 1,
+    pageSize: 999999999,
+    queryComplete: 0,
+  });
+  if (code == "200") {
+    oderList.value = data.records;
+  }
+};
 const oderList = ref([]);
-emitter.on(EventsNames.ORDER_LIST, (val) => {
-  oderList.value = val.value;
-});
+// emitter.on(EventsNames.ORDER_LIST, (val) => {
+//   oderList.value = val.value;
+// });
 defineExpose({ open });
-onMounted(() => {});
+onMounted(() => {
+  getOrdersData();
+});
 </script>
 
 <style lang="scss" scoped>

+ 0 - 2
src/utils/common.ts

@@ -12,8 +12,6 @@ enum EventsNames {
   PROCESS_REDER = "PROCESS_REDER",
   //   测试数据开始测试之后的事件
   TEST_DATA = "TEST_DATA",
-  //当前未完成订单数据
-  ORDER_LIST = "ORDER_LIST",
 }
 
 export { emitter, EventsNames };

+ 0 - 1
src/views/process/orders.vue

@@ -91,7 +91,6 @@ const getOrdersData = async () => {
     } else {
       ordersDataArray.value.push(...data.records);
     }
-    emitter.emit(EventsNames.ORDER_LIST, ordersDataArray);
     ordersSum.value = data.totalCount;
     ordersQuery.value.totalPages = data.totalPages;
   }