feat&refactor: 完成多模块功能迭代与配置优化
本次提交覆盖多个业务模块的功能完善与体验优化:
1. **鉴权与配置调整**:
- 统一JWT滑动续签逻辑,简化Token存储,移除RefreshToken相关冗余代码
- 调整多项目配置文件中JWT过期时间为3600秒,统一会话闲置窗口
- 工位配置放开1~12限制,改为仅校验大于0
2. **术语统一替换**:全链路将"精密件"替换为"电气件",修正物料管理描述
3. **功能新增**:
- 新增工位类型、工艺路线与产线点位台账模块
- 添加工艺PDF预览面板、工位终端代理转发接口
- 新增操作日志按操作人列表筛选、工位登出日志记录
- 新增PLC移料指令与产线点位状态管理
4. **业务流程优化**:
- 调整BOM物料删除校验逻辑,优化工单备料计算
- 补充物料图号、检测单号等追溯字段
- 完善工艺流程图与工位绑定关系说明
- 优化前端页面文案与交互细节
5. **代码规范与维护**:
- 新增通用工具函数与前端静态资源
- 整理路由权限与中间件逻辑
- 修复部分接口与配置的不兼容问题
This commit is contained in:
@@ -4,11 +4,6 @@
|
||||
<!-- ============ 流程列表 ============ -->
|
||||
<el-tab-pane label="流程列表" name="list">
|
||||
<el-form inline>
|
||||
<el-form-item label="工位号">
|
||||
<el-select v-model="query.stationNo" placeholder="全部" clearable style="width:140px" @change="loadFlows">
|
||||
<el-option v-for="i in 12" :key="i" :label="`工位${i}`" :value="i" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="loadFlows">查询</el-button>
|
||||
</el-form-item>
|
||||
@@ -20,7 +15,6 @@
|
||||
<el-table :data="flows" border size="small">
|
||||
<el-table-column prop="id" label="ID" width="60" />
|
||||
<el-table-column prop="name" label="流程名" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="stationNo" label="工序编号" width="100" align="center" />
|
||||
<el-table-column label="PDF" width="90" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.pdfFile" link type="primary" @click="previewPdf(row.pdfFile)">预览</el-button>
|
||||
@@ -76,12 +70,6 @@
|
||||
<el-input v-model="flowDlg.name" placeholder="如 3号工位装配流程" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工序编号" required>
|
||||
<el-input-number v-model="flowDlg.stationNo" :min="1" :max="12" style="width:100%" />
|
||||
<div style="color:#909399;font-size:12px;line-height:1.4">该流程承载的工序编号(1~999,流程内唯一即可;与物理工位的对应关系在「关联工位」页维护)</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
@@ -135,6 +123,12 @@
|
||||
<el-table-column label="是否拧紧" width="90" align="center">
|
||||
<template #default="{ row }"><el-switch v-model="row.isTorque" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测确认" width="90" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-switch v-model="row.needCheck" />
|
||||
<el-tooltip content="开启后,报工前须完成该步骤的检测确认" placement="top"><span style="margin-left:4px;color:#909399;font-size:12px">?</span></el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" min-width="120">
|
||||
<template #default="{ row }"><el-input v-model="row.remark" placeholder="备注(可空)" /></template>
|
||||
</el-table-column>
|
||||
@@ -227,8 +221,10 @@ import request from '../utils/request'
|
||||
|
||||
const activeTab = ref('list')
|
||||
const flows = ref([])
|
||||
const query = reactive({ stationNo: undefined })
|
||||
const pdfInput = ref(null)
|
||||
const flowPage = ref(1)
|
||||
const flowPageSize = ref(10)
|
||||
const flowTotal = ref(0)
|
||||
|
||||
/* ---------- 权限 ---------- */
|
||||
function can(code) {
|
||||
@@ -254,6 +250,7 @@ function blankStep(seq) {
|
||||
name: '',
|
||||
collectType: 'MANUAL',
|
||||
isTorque: false,
|
||||
needCheck: false,
|
||||
remark: '',
|
||||
criteria: []
|
||||
}
|
||||
@@ -261,7 +258,6 @@ function blankStep(seq) {
|
||||
|
||||
async function loadFlows() {
|
||||
const params = { page: flowPage.value, pageSize: flowPageSize.value }
|
||||
if (query.stationNo) params.stationNo = query.stationNo
|
||||
const data = await request.get('/process-flows', { params })
|
||||
flows.value = (data && data.list) ? data.list : (data || [])
|
||||
flowTotal.value = (data && data.total) ? data.total : flows.value.length
|
||||
@@ -301,7 +297,7 @@ async function onPdfChange(e) {
|
||||
}
|
||||
|
||||
const flowDlg = reactive({
|
||||
id: 0, name: '', stationNo: 1, stations: [], pdfFile: '', status: 'ACTIVE',
|
||||
id: 0, name: '', stations: [], pdfFile: '', status: 'ACTIVE',
|
||||
remark: '', uploading: false, steps: [blankStep(1)]
|
||||
})
|
||||
|
||||
@@ -309,8 +305,7 @@ function openFlow(row) {
|
||||
if (row) {
|
||||
flowDlg.id = row.id
|
||||
flowDlg.name = row.name || ''
|
||||
flowDlg.stationNo = row.stationNo || 1
|
||||
flowDlg.stations = (row.stations && row.stations.length) ? [...row.stations] : [row.stationNo || 1]
|
||||
flowDlg.stations = (row.stations && row.stations.length) ? [...row.stations] : []
|
||||
flowDlg.pdfFile = row.pdfFile || ''
|
||||
flowDlg.status = row.status || 'ACTIVE'
|
||||
flowDlg.remark = row.remark || ''
|
||||
@@ -320,12 +315,13 @@ function openFlow(row) {
|
||||
name: s.name || '',
|
||||
collectType: s.collectType || 'MANUAL',
|
||||
isTorque: !!s.isTorque,
|
||||
needCheck: !!s.needCheck,
|
||||
remark: s.remark || '',
|
||||
criteria: (s.criteria || []).map((c) => ({ ...c }))
|
||||
}))
|
||||
} else {
|
||||
Object.assign(flowDlg, {
|
||||
id: 0, name: '', stationNo: 1, stations: [1], pdfFile: '', status: 'ACTIVE', remark: '', steps: []
|
||||
id: 0, name: '', stations: [], pdfFile: '', status: 'ACTIVE', remark: '', steps: []
|
||||
})
|
||||
}
|
||||
if (!flowDlg.steps.length) flowDlg.steps.push(blankStep(1))
|
||||
@@ -371,12 +367,10 @@ function saveCriteria() {
|
||||
|
||||
async function saveFlow() {
|
||||
if (!flowDlg.name) return ElMessage.warning('请填写流程名')
|
||||
if (!flowDlg.stationNo) return ElMessage.warning('请选择工序编号(1~12)')
|
||||
// 绑定关系由「关联工位」页维护:此处不再收集绑定工位,保存流程本身
|
||||
// 绑定关系由「关联工位」页维护:此处只保存流程本身(不收集/不改动工位绑定)
|
||||
const body = {
|
||||
id: flowDlg.id || undefined,
|
||||
name: flowDlg.name,
|
||||
stationNo: flowDlg.stationNo,
|
||||
stations: flowDlg.stations,
|
||||
pdfFile: flowDlg.pdfFile,
|
||||
status: flowDlg.status,
|
||||
@@ -386,6 +380,7 @@ async function saveFlow() {
|
||||
name: st.name,
|
||||
collectType: st.collectType,
|
||||
isTorque: st.isTorque,
|
||||
needCheck: st.needCheck,
|
||||
remark: st.remark,
|
||||
criteria: st.criteria
|
||||
}))
|
||||
@@ -421,7 +416,9 @@ async function toggleStatus(row) {
|
||||
loadFlows()
|
||||
}
|
||||
|
||||
onMounted(loadFlows)
|
||||
onMounted(() => {
|
||||
loadFlows()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user