|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="containerBox">
|
|
|
- <el-collapse accordion v-model="activeNames">
|
|
|
+ <el-collapse>
|
|
|
<el-collapse-item
|
|
|
v-for="(item, index) in materialsData"
|
|
|
:key="index"
|
|
@@ -18,49 +18,50 @@
|
|
|
class="opear"
|
|
|
style="font-size: 18px; color: rgb(10, 89, 247); font-weight: 600"
|
|
|
>新增数据</span
|
|
|
- ></template
|
|
|
- >
|
|
|
- <el-table :data="item.children" border>
|
|
|
- <el-table-column prop="a" label="设备编号">
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <el-table :data="tableData[index]" border>
|
|
|
+ <el-table-column prop="deviceNo" label="设备编号">
|
|
|
<template #default="scope" v-if="!item.updateStatus">
|
|
|
- {{ scope.row.a }}
|
|
|
+ {{ scope.row.deviceNo }}
|
|
|
</template>
|
|
|
<template #default v-else>
|
|
|
- <el-input v-model="item.equitType" />
|
|
|
+ <el-input v-model="tableData[index].deviceNo" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="b" label="设备名称">
|
|
|
+ <el-table-column prop="deviceName" label="设备名称">
|
|
|
<template #default="scope" v-if="!item.updateStatus">
|
|
|
- {{ scope.row.b }}
|
|
|
+ {{ scope.row.deviceName }}
|
|
|
</template>
|
|
|
<template #default v-else>
|
|
|
- <el-input v-model="item.equitType" />
|
|
|
+ <el-input v-model="tableData[index].deviceName" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="equitType" label="高度">
|
|
|
+ <el-table-column prop="created" label="采集时间">
|
|
|
<template #default="scope" v-if="!item.updateStatus">
|
|
|
- {{ scope.row.c }}
|
|
|
+ {{ scope.row.created }}
|
|
|
</template>
|
|
|
<template #default v-else>
|
|
|
- <el-input v-model="item.equitType" />
|
|
|
+ <el-input v-model="tableData[index].created" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="equitType" label="宽度">
|
|
|
- <template #default="scope" v-if="!item.updateStatus">
|
|
|
- {{ scope.row.d }}
|
|
|
- </template>
|
|
|
- <template #default v-else>
|
|
|
- <el-input v-model="item.equitType" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="equitType" label="采集时间">
|
|
|
- <template #default="scope" v-if="!item.updateStatus">
|
|
|
- {{ scope.row.e }}
|
|
|
- </template>
|
|
|
- <template #default v-else>
|
|
|
- <el-input v-model="item.equitType" />
|
|
|
+ <!-- <template v-if="tableData[index][0].length > 0">
|
|
|
+ <template v-if="tableData[index][0].data != null">
|
|
|
+ <template
|
|
|
+ v-for="(value, key) in tableData[index][0].data"
|
|
|
+ :key="key"
|
|
|
+ >
|
|
|
+ <el-table-column :prop="key" :label="key">
|
|
|
+ <template #default v-if="!item.updateStatus">
|
|
|
+ {{ value }}
|
|
|
+ </template>
|
|
|
+ <template #default v-else>
|
|
|
+ <el-input v-model="tableData[index].created" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </template> -->
|
|
|
<el-table-column label="操作">
|
|
|
<template #default="scope">
|
|
|
<!-- <span class="opear">完成</span> -->
|
|
@@ -69,41 +70,74 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <Pagination
|
|
|
+ v-model:limit="pageS[index].pageSize"
|
|
|
+ v-model:page="pageS[index].pageNo"
|
|
|
+ :total="pageS[index].total"
|
|
|
+ @pagination="paginationChange(index)"
|
|
|
+ position="right"
|
|
|
+ />
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts">
|
|
|
-import { getScrewdriverData } from "@/api/prosteps/screwdriver";
|
|
|
+<script setup>
|
|
|
+import {
|
|
|
+ getScrewdriverData,
|
|
|
+ getAcquisitionData,
|
|
|
+} from "@/api/prosteps/screwdriver";
|
|
|
import { useProcessStore } from "@/store";
|
|
|
import { useDictionaryStore } from "@/store";
|
|
|
-import { DeviceContainer, ResData } from "@/api/prosteps/screwdriverTypes";
|
|
|
const dictS = useDictionaryStore();
|
|
|
const store = useProcessStore();
|
|
|
-const activeNames = ref([0]);
|
|
|
-const materialsData = ref<DeviceContainer[]>([]);
|
|
|
+const tableData = ref([]);
|
|
|
+const materialsData = ref([]);
|
|
|
+
|
|
|
const getData = async () => {
|
|
|
- const res: ResData = await getScrewdriverData();
|
|
|
+ const res = await getScrewdriverData();
|
|
|
materialsData.value = res.data;
|
|
|
+ materialsData.value.forEach((item, index) => {
|
|
|
+ pageS.value.push({ ...page });
|
|
|
+ getAcquisitionDatas(item.deviceNo, index);
|
|
|
+ });
|
|
|
+};
|
|
|
+const paginationChange = (index) => {};
|
|
|
+const getAcquisitionDatas = async (No, index) => {
|
|
|
+ const res = await getAcquisitionData({
|
|
|
+ deviceNo: No,
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
+ pageNo: pageS.value[index].pageNo,
|
|
|
+ pageSize: pageS.value[index].pageSize,
|
|
|
+ processId: store.scanInfo.id,
|
|
|
+ });
|
|
|
+ pageS.value[index].total = res.data.totalCount;
|
|
|
+ // res.data.records.forEach((item) => {
|
|
|
+ // item.data = JSON.parse(item.data);
|
|
|
+ // });
|
|
|
+ tableData.value.push(res.data.records);
|
|
|
};
|
|
|
const aa = () => {
|
|
|
console.log("111");
|
|
|
};
|
|
|
-const page = reactive({
|
|
|
+const pageS = ref([]);
|
|
|
+const page = {
|
|
|
pageSize: 10,
|
|
|
pageNo: 1,
|
|
|
total: 0,
|
|
|
-});
|
|
|
-onMounted(() => {
|
|
|
- getData();
|
|
|
+};
|
|
|
+onMounted(async () => {
|
|
|
+ await getData();
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-//生产履历表格公共样式
|
|
|
+.containerBox {
|
|
|
+ background-color: white;
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
:deep(.el-collapse-item__header) {
|
|
|
- background-color: white !important;
|
|
|
+ background-color: rgb(241, 243, 245) !important;
|
|
|
padding: 0 20px;
|
|
|
height: 80px;
|
|
|
}
|
|
@@ -120,6 +154,7 @@ onMounted(() => {
|
|
|
}
|
|
|
:deep(.el-collapse-item__wrap) {
|
|
|
padding: 20px;
|
|
|
+ border: 1px solid rgb(241, 243, 245);
|
|
|
}
|
|
|
.opear {
|
|
|
font-size: 16px;
|