Browse Source

fix: 喷涂日志

master
guoapeng 3 weeks ago
parent
commit
859936df8b
  1. 4
      src/components/spray/sprayParams/index.vue
  2. 80
      src/views/log/index.vue

4
src/components/spray/sprayParams/index.vue

@ -162,12 +162,14 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' |
}
const matrixCraftChange = async (id: number) => {
loading.value = true
form.value = await getCraftById(id)
console.log(form.value)
await nextTick(() => {
form.value.times?.forEach((item: any, index: number) => {
sprayRefs.value[index].updateSelection(item.x1 * 5, item.y1 * 5, (item.x2 - item.x1) * 5, (item.y2 - item.y1) * 5)
})
loading.value = false
})
}
</script>
@ -348,7 +350,7 @@ const matrixCraftChange = async (id: number) => {
<ft-button type="primary" @click="okHandle">
确认
</ft-button>
<ft-button type="primary" @click="updateCraftAndOk">
<ft-button type="primary" :disabled="!form.id" @click="updateCraftAndOk">
确认并更新工艺
</ft-button>
</template>

80
src/views/log/index.vue

@ -3,10 +3,8 @@ import type { logQuery } from 'apis/log'
import { del, list } from 'apis/log'
import { list as matrixList } from 'apis/matrix'
import { list as matrixCraftList } from 'apis/matrixCraft'
import route3 from 'assets/images/route.png'
import route2 from 'assets/images/route_horizontal.png'
import route1 from 'assets/images/route_vertical.png'
import FtButton from 'components/common/FTButton/index.vue'
import SprayParams from 'components/spray/sprayParams/index.vue'
import { ElMessageBox } from 'element-plus'
import { FtMessage } from 'libs/message'
import { onMounted, ref } from 'vue'
@ -74,6 +72,13 @@ const delHandle = async () => {
await getList()
})
}
const selectCraftVisible = ref(false)
const currentFormData = ref<any>({})
const viewParams = (row: any) => {
currentFormData.value = row
selectCraftVisible.value = true
}
</script>
<template>
@ -108,7 +113,7 @@ const delHandle = async () => {
</div>
</template>
</el-table-column>
<el-table-column prop="name" label="工艺名称" width="100">
<el-table-column prop="name" label="工艺名称">
<template #default="scope">
<div class="scope-box">
<div>
@ -117,71 +122,30 @@ const delHandle = async () => {
</div>
</template>
</el-table-column>
<el-table-column prop="matrixPathType" label="喷涂路线">
<template #default="scope">
<div class="scope-box">
<img v-show="scope.row.matrixPathType === 'horizontal'" :src="route1" width="20px" height="20px" alt="icon">
<img v-show="scope.row.matrixPathType === 'vertical'" :src="route2" width="20px" height="20px" alt="icon">
<img v-show="scope.row.matrixPathType === 'grid'" :src="route3" width="20px" height="20px" alt="icon">
</div>
</template>
</el-table-column>
<el-table-column prop="motorZHeight" label="喷涂高度">
<template #default="scope">
<div class="scope-box">
{{ scope.row.motorZHeight }}mm
</div>
</template>
</el-table-column>
<el-table-column prop="gasPressure" label="氮气气压">
<template #default="scope">
<div class="scope-box">
{{ scope.row.gasPressure }}Mpa
</div>
</template>
</el-table-column>
<el-table-column prop="volume" label="基质流速">
<el-table-column prop="createTime" label="创建时间" />
<el-table-column prop="createTime" label="">
<template #default="scope">
<div class="scope-box">
{{ scope.row.volume }}uL/min
</div>
</template>
</el-table-column>
<el-table-column prop="highVoltageValue" label="电压">
<template #default="scope">
<div class="scope-box">
{{ scope.row.highVoltageValue }}V
</div>
</template>
</el-table-column>
<el-table-column prop="movingSpeed" label="移速">
<template #default="scope">
<div class="scope-box">
{{ scope.row.movingSpeed }}mm/s
</div>
</template>
</el-table-column>
<el-table-column prop="spacing" label="行间距">
<template #default="scope">
<div class="scope-box">
{{ scope.row.spacing }}mm
</div>
</template>
</el-table-column>
<el-table-column prop="times" label="喷涂次数">
<template #default="scope">
<div class="scope-box">
{{ scope.row.times }}
<div>
<el-button type="primary" @click="viewParams(scope.row)">
喷涂参数
</el-button>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="150" />
</el-table>
</div>
<div class="table-footer">
<el-pagination size="large" background layout="prev, pager, next, total" :total @change="pageChange" />
</div>
<SprayParams
v-if="selectCraftVisible"
disabled
:form-data="currentFormData"
@cancel="selectCraftVisible = false"
/>
</div>
</template>

Loading…
Cancel
Save