1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <template>
- <div class="mainContentBox">
- <el-row :gutter="20">
- <el-col :span="6" class="elColClasss">
- <Orders :ordersSum="ordersSum" @getindex="setSelectOrderIndex" />
- </el-col>
- <el-col :span="6" class="elColClasss">
- <div class="grid-content ep-bg-purple">
- <Processes />
- </div>
- </el-col>
- <CurrentProduction />
- </el-row>
- </div>
- </template>
- <script lang="ts" setup>
- import { onMounted, provide, ref } from "vue";
- import Orders from "@/views/process/orders.vue";
- import Processes from "@/views/process/processes.vue";
- import CurrentProduction from "@/views/process/currentProduction.vue";
- import { getOrders } from "@/api/process";
- defineOptions({ name: "ProcessMain" });
- //未完成订单数组
- const ordersDataArray = ref([]);
- //未完成任务总数
- const ordersSum = ref(0);
- // 获取选中订单的Index
- const selectOrderIndex = ref(NaN);
- // 获取选中订单对应流转卡号的Data
- const selectSeqArray = ref([]);
- // 获取选中订单对应流转卡号的index
- const selectSeqIndex = ref(null);
- const setSelectOrderIndex = (value: number) => {
- selectOrderIndex.value = value;
- selectSeqArray.value = ordersDataArray.value[value].seqs;
- };
- provide("selectSeqIndex", selectSeqIndex);
- provide("ordersDataArray", ordersDataArray);
- provide("selectOrderIndex", selectOrderIndex);
- provide("selectSeqArray", selectSeqArray);
- //获取未完成订单的参数
- const ordersQuery = ref({
- orders: [],
- pageNo: 1,
- pageSize: 9999,
- });
- //获取未完成订单Data
- const getOrdersData = async () => {
- const { code, data } = await getOrders(ordersQuery.value);
- if (code == "200") {
- ordersDataArray.value = data.records;
- ordersSum.value = data.totalCount;
- }
- };
- onMounted(() => {
- getOrdersData();
- });
- </script>
- <style lang="scss" scoped>
- .elColClasss {
- height: calc(100vh - 130px);
- }
- </style>
|