Merge branch 'main' of http://118.25.48.201:3000/RIZO/Valeo_Line_MES_vue
This commit is contained in:
commit
107a343540
2
.env
2
.env
@ -1,3 +1,3 @@
|
||||
|
||||
# 页面标题
|
||||
VITE_APP_TITLE = 'Valeo-Line-Mes'
|
||||
VITE_APP_TITLE = '上海干巷总装车间LMES'
|
||||
@ -1,7 +1,7 @@
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
VITE_APP_API_HOST = 'http://localhost:8877'
|
||||
VITE_APP_API_HOST = 'http://localhost:8876'
|
||||
|
||||
# 开发环境
|
||||
VITE_APP_BASE_API = '/dev-api'
|
||||
|
||||
57
src/api/producttraceprocessparameters.js
Normal file
57
src/api/producttraceprocessparameters.js
Normal file
@ -0,0 +1,57 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 工艺参数采集分页查询
|
||||
* @param {查询条件} data
|
||||
*/
|
||||
export function listProductTraceProcessParameters(query) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工艺参数采集
|
||||
* @param data
|
||||
*/
|
||||
export function addProductTraceProcessParameters(data) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 修改工艺参数采集
|
||||
* @param data
|
||||
*/
|
||||
export function updateProductTraceProcessParameters(data) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters',
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取工艺参数采集详情
|
||||
* @param {Id}
|
||||
*/
|
||||
export function getProductTraceProcessParameters(id) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工艺参数采集
|
||||
* @param {主键} pid
|
||||
*/
|
||||
export function delProductTraceProcessParameters(pid) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters/delete/' + pid,
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
57
src/api/qualityManagement/producttraceprocessparameters.js
Normal file
57
src/api/qualityManagement/producttraceprocessparameters.js
Normal file
@ -0,0 +1,57 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 工艺参数采集分页查询
|
||||
* @param {查询条件} data
|
||||
*/
|
||||
export function listProductTraceProcessParameters(query) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工艺参数采集
|
||||
* @param data
|
||||
*/
|
||||
export function addProductTraceProcessParameters(data) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 修改工艺参数采集
|
||||
* @param data
|
||||
*/
|
||||
export function updateProductTraceProcessParameters(data) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters',
|
||||
method: 'PUT',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取工艺参数采集详情
|
||||
* @param {Id}
|
||||
*/
|
||||
export function getProductTraceProcessParameters(id) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工艺参数采集
|
||||
* @param {主键} pid
|
||||
*/
|
||||
export function delProductTraceProcessParameters(pid) {
|
||||
return request({
|
||||
url: 'mes/ProductTraceProcessParameters/delete/' + pid,
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/images/title.jpg
Normal file
BIN
src/assets/images/title.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.4 KiB |
@ -55,7 +55,7 @@ export default {
|
||||
/**
|
||||
* 版权信息
|
||||
*/
|
||||
copyright: 'Copyright ©2026 <a target="_black" href="">武汉精测电子集团股份有限公司</a> All Rights Reserved.',
|
||||
copyright: 'Copyright ©2026 <a target="_black" href="">苏州锐至奥信息技术有限公司</a> All Rights Reserved.',
|
||||
/**
|
||||
* 是否显示底部栏
|
||||
*/
|
||||
|
||||
476
src/views/ProductTraceProcessParameters.vue
Normal file
476
src/views/ProductTraceProcessParameters.vue
Normal file
@ -0,0 +1,476 @@
|
||||
<!--
|
||||
* @Descripttion: (工艺参数采集/product_trace_process_parameters)
|
||||
* @Author: (admin)
|
||||
* @Date: (2026-01-13)
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
||||
<el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 工具区域 -->
|
||||
<el-row :gutter="15" class="mb10">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" v-hasPermi="['producttraceprocessparameters:add']" plain icon="plus" @click="handleAdd">
|
||||
{{ $t('btn.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
:data="dataList"
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
border
|
||||
header-cell-class-name="el-table-header-cell"
|
||||
highlight-current-row
|
||||
@sort-change="sortChange"
|
||||
>
|
||||
<el-table-column prop="dataType" label="数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等" align="center" v-if="columns.showColumn('dataType')">
|
||||
<template #default="scope">
|
||||
<dict-tag :options=" options.dataTypeOptions" :value="scope.row.dataType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="updatedTime" label="更新时间" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedTime')"/>
|
||||
<el-table-column prop="createdTime" label="创建时间" :show-overflow-tooltip="true" v-if="columns.showColumn('createdTime')"/>
|
||||
<el-table-column prop="updatedby" label="更新人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedby')"/>
|
||||
<el-table-column prop="createdby" label="创建人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('createdby')"/>
|
||||
<el-table-column prop="operator" label="操作人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('operator')"/>
|
||||
<el-table-column prop="collectTime" label="采集时间" :show-overflow-tooltip="true" v-if="columns.showColumn('collectTime')"/>
|
||||
<el-table-column prop="result" label="1 是合格 0是不合格" align="center" v-if="columns.showColumn('result')"/>
|
||||
<el-table-column prop="maxValue" label="最大允许值(用于报警/校验)" align="center" v-if="columns.showColumn('maxValue')"/>
|
||||
<el-table-column prop="minValue" label="最小允许值(用于报警/校验)" align="center" v-if="columns.showColumn('minValue')"/>
|
||||
<el-table-column prop="standardValue" label="标准/目标值(如目标温度 200.0 ℃)" align="center" v-if="columns.showColumn('standardValue')"/>
|
||||
<el-table-column prop="unit" label="单位,如:℃、MPa、秒、mm" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('unit')"/>
|
||||
<el-table-column prop="id" label="主键" align="center" v-if="columns.showColumn('id')"/>
|
||||
<el-table-column prop="description" label="参数描述,如:模具温度,用于热压工序" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('description')"/>
|
||||
<el-table-column prop="plcPoint" label="plc点位" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('plcPoint')"/>
|
||||
<el-table-column prop="parameterName" label="显示名称(用于UI展示,可和name一样)" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('parameterName')"/>
|
||||
<el-table-column prop="parameterCode" label="参数名称,如:温度、压力、时间" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('parameterCode')"/>
|
||||
<el-table-column prop="workstationCode" label="工站code" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('workstationCode')"/>
|
||||
<el-table-column prop="productlinebodyCode" label="产线code" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('productlinebodyCode')"/>
|
||||
<el-table-column prop="flowCode" label="流程code" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('flowCode')"/>
|
||||
<el-table-column prop="operationCode" label="工序号" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('operationCode')"/>
|
||||
<el-table-column prop="routingCode" label="工艺路线编码" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('routingCode')"/>
|
||||
<el-table-column prop="productSn" label="产品SN" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('productSn')"/>
|
||||
<el-table-column prop="workorder" label="工单号" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('workorder')"/>
|
||||
<el-table-column label="操作" width="160">
|
||||
<template #default="scope">
|
||||
<el-button type="success" size="small" icon="edit" title="编辑" v-hasPermi="['producttraceprocessparameters:edit']" @click="handleUpdate(scope.row)"></el-button>
|
||||
<el-button type="danger" size="small" icon="delete" title="删除" v-hasPermi="['producttraceprocessparameters:delete']" @click="handleDelete(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
|
||||
<el-dialog :title="title" :lock-scroll="false" v-model="open" >
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row :gutter="20">
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等" prop="dataType">
|
||||
<el-select v-model="form.dataType" placeholder="请选择数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等">
|
||||
<el-option
|
||||
v-for="item in options.dataTypeOptions"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="更新时间" prop="updatedTime">
|
||||
<el-date-picker
|
||||
v-model="form.updatedTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="创建时间" prop="createdTime">
|
||||
<el-date-picker
|
||||
v-model="form.createdTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="更新人" prop="updatedby">
|
||||
<el-input v-model="form.updatedby" placeholder="请输入更新人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="创建人" prop="createdby">
|
||||
<el-input v-model="form.createdby" placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="操作人" prop="operator">
|
||||
<el-input v-model="form.operator" placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="采集时间" prop="collectTime">
|
||||
<el-date-picker
|
||||
v-model="form.collectTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="1 是合格 0是不合格" prop="result">
|
||||
<el-input v-model.number="form.result" placeholder="请输入1 是合格 0是不合格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="最大允许值(用于报警/校验)" prop="maxValue">
|
||||
<el-input v-model="form.maxValue" placeholder="请输入最大允许值(用于报警/校验)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="最小允许值(用于报警/校验)" prop="minValue">
|
||||
<el-input v-model="form.minValue" placeholder="请输入最小允许值(用于报警/校验)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="标准/目标值(如目标温度 200.0 ℃)" prop="standardValue">
|
||||
<el-input v-model="form.standardValue" placeholder="请输入标准/目标值(如目标温度 200.0 ℃)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="单位,如:℃、MPa、秒、mm" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位,如:℃、MPa、秒、mm" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="参数描述,如:模具温度,用于热压工序" prop="description">
|
||||
<el-input v-model="form.description" placeholder="请输入参数描述,如:模具温度,用于热压工序" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="plc点位" prop="plcPoint">
|
||||
<el-input v-model="form.plcPoint" placeholder="请输入plc点位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="显示名称(用于UI展示,可和name一样)" prop="parameterName">
|
||||
<el-input v-model="form.parameterName" placeholder="请输入显示名称(用于UI展示,可和name一样)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="参数名称,如:温度、压力、时间" prop="parameterCode">
|
||||
<el-input v-model="form.parameterCode" placeholder="请输入参数名称,如:温度、压力、时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="工站code" prop="workstationCode">
|
||||
<el-input v-model="form.workstationCode" placeholder="请输入工站code" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="产线code" prop="productlinebodyCode">
|
||||
<el-input v-model="form.productlinebodyCode" placeholder="请输入产线code" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="流程code" prop="flowCode">
|
||||
<el-input v-model="form.flowCode" placeholder="请输入流程code" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="工序号" prop="operationCode">
|
||||
<el-input v-model="form.operationCode" placeholder="请输入工序号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="工艺路线编码" prop="routingCode">
|
||||
<el-input v-model="form.routingCode" placeholder="请输入工艺路线编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="产品SN" prop="productSn">
|
||||
<el-input v-model="form.productSn" placeholder="请输入产品SN" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="工单号" prop="workorder">
|
||||
<el-input v-model="form.workorder" placeholder="请输入工单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer v-if="opertype != 3">
|
||||
<el-button text @click="cancel">{{ $t('btn.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="state.submitLoading" @click="submitForm">{{ $t('btn.submit') }}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="producttraceprocessparameters">
|
||||
import { listProductTraceProcessParameters,
|
||||
addProductTraceProcessParameters, delProductTraceProcessParameters,
|
||||
updateProductTraceProcessParameters,getProductTraceProcessParameters,
|
||||
}
|
||||
from '@/api/mes/producttraceprocessparameters.js'
|
||||
const { proxy } = getCurrentInstance()
|
||||
const ids = ref([])
|
||||
const loading = ref(false)
|
||||
const showSearch = ref(true)
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sort: '',
|
||||
sortType: 'asc',
|
||||
})
|
||||
const columns = ref([
|
||||
{ visible: true, align: 'center', type: 'dict', prop: 'dataType', label: '数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'updatedTime', label: '更新时间' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'createdTime', label: '创建时间' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'updatedby', label: '更新人' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'createdby', label: '创建人' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'operator', label: '操作人' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'collectTime', label: '采集时间' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'result', label: '1 是合格 0是不合格' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'maxValue', label: '最大允许值(用于报警/校验)' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'minValue', label: '最小允许值(用于报警/校验)' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'standardValue', label: '标准/目标值(如目标温度 200.0 ℃)' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'unit', label: '单位,如:℃、MPa、秒、mm' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'id', label: '主键' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'description', label: '参数描述,如:模具温度,用于热压工序' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'plcPoint', label: 'plc点位' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'parameterName', label: '显示名称(用于UI展示,可和name一样)' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'parameterCode', label: '参数名称,如:温度、压力、时间' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'workstationCode', label: '工站code' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'productlinebodyCode', label: '产线code' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'flowCode', label: '流程code' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'operationCode', label: '工序号' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'routingCode', label: '工艺路线编码' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'productSn', label: '产品SN' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'workorder', label: '工单号' ,showOverflowTooltip: true },
|
||||
//{ visible: false, prop: 'actions', label: '操作', type: 'slot', width: '160' }
|
||||
])
|
||||
const total = ref(0)
|
||||
const dataList = ref([])
|
||||
const queryRef = ref()
|
||||
const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
|
||||
|
||||
|
||||
var dictParams = [
|
||||
]
|
||||
|
||||
|
||||
function getList(){
|
||||
loading.value = true
|
||||
listProductTraceProcessParameters(queryParams).then(res => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
dataList.value = data.result
|
||||
total.value = data.totalNum
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询
|
||||
function handleQuery() {
|
||||
queryParams.pageNum = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
// 重置查询操作
|
||||
function resetQuery(){
|
||||
proxy.resetForm("queryRef")
|
||||
handleQuery()
|
||||
}
|
||||
// 自定义排序
|
||||
function sortChange(column) {
|
||||
var sort = undefined
|
||||
var sortType = undefined
|
||||
|
||||
if (column.prop != null && column.order != null) {
|
||||
sort = column.prop
|
||||
sortType = column.order
|
||||
|
||||
}
|
||||
queryParams.sort = sort
|
||||
queryParams.sortType = sortType
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/*************** form操作 ***************/
|
||||
const formRef = ref()
|
||||
const title = ref('')
|
||||
// 操作类型 1、add 2、edit 3、view
|
||||
const opertype = ref(0)
|
||||
const open = ref(false)
|
||||
const state = reactive({
|
||||
single: true,
|
||||
multiple: true,
|
||||
submitLoading: false,
|
||||
form: {},
|
||||
rules: {
|
||||
dataType: [{ required: true, message: "数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等不能为空", trigger: "change" }],
|
||||
parameterCode: [{ required: true, message: "参数名称,如:温度、压力、时间不能为空", trigger: "blur" }],
|
||||
},
|
||||
options: {
|
||||
// 数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||
dataTypeOptions: [],
|
||||
}
|
||||
})
|
||||
|
||||
const { form, rules, options, single, multiple } = toRefs(state)
|
||||
|
||||
// 关闭dialog
|
||||
function cancel(){
|
||||
open.value = false
|
||||
reset()
|
||||
}
|
||||
|
||||
// 重置表单
|
||||
function reset() {
|
||||
form.value = {
|
||||
dataType: null,
|
||||
updatedTime: null,
|
||||
createdTime: null,
|
||||
updatedby: null,
|
||||
createdby: null,
|
||||
operator: null,
|
||||
collectTime: null,
|
||||
result: null,
|
||||
maxValue: null,
|
||||
minValue: null,
|
||||
standardValue: null,
|
||||
unit: null,
|
||||
id: null,
|
||||
description: null,
|
||||
plcPoint: null,
|
||||
parameterName: null,
|
||||
parameterCode: null,
|
||||
workstationCode: null,
|
||||
productlinebodyCode: null,
|
||||
flowCode: null,
|
||||
operationCode: null,
|
||||
routingCode: null,
|
||||
productSn: null,
|
||||
workorder: null,
|
||||
};
|
||||
proxy.resetForm("formRef")
|
||||
}
|
||||
|
||||
|
||||
// 添加按钮操作
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true
|
||||
state.submitLoading = false
|
||||
title.value = '添加工艺参数采集'
|
||||
opertype.value = 1
|
||||
}
|
||||
// 修改按钮操作
|
||||
function handleUpdate(row) {
|
||||
reset()
|
||||
const id = row.id || ids.value
|
||||
getProductTraceProcessParameters(id).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
open.value = true
|
||||
title.value = '修改工艺参数采集'
|
||||
opertype.value = 2
|
||||
|
||||
form.value = {
|
||||
...data,
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 添加&修改 表单提交
|
||||
function submitForm() {
|
||||
proxy.$refs["formRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
state.submitLoading = true
|
||||
|
||||
if (form.value.id != undefined && opertype.value === 2) {
|
||||
updateProductTraceProcessParameters(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess("修改成功")
|
||||
open.value = false
|
||||
getList()
|
||||
})
|
||||
.finally(() => {
|
||||
state.submitLoading = false
|
||||
})
|
||||
} else {
|
||||
addProductTraceProcessParameters(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess("新增成功")
|
||||
open.value = false
|
||||
getList()
|
||||
})
|
||||
.finally(() => {
|
||||
setTimeout(() => {
|
||||
state.submitLoading = false
|
||||
}, 800)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除按钮操作
|
||||
function handleDelete(row) {
|
||||
const Ids = row.id || ids.value
|
||||
|
||||
proxy
|
||||
.$confirm('是否确认删除参数编号为"' + Ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: proxy.$t('common.ok'),
|
||||
cancelButtonText: proxy.$t('common.cancel'),
|
||||
type: "warning",
|
||||
})
|
||||
.then(function () {
|
||||
return delProductTraceProcessParameters(Ids)
|
||||
})
|
||||
.then(() => {
|
||||
getList()
|
||||
proxy.$modal.msgSuccess("删除成功")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
handleQuery()
|
||||
</script>
|
||||
@ -2,14 +2,14 @@
|
||||
<!-- <starBackground></starBackground> -->
|
||||
<div class="login-wrap">
|
||||
<div class="logo">
|
||||
<img src="@/assets/images/title.png" alt="">
|
||||
<img src="@/assets/images/title.jpg" alt="" />
|
||||
</div>
|
||||
<div class="login">
|
||||
<h3 class="title">{{ defaultSettings.title }}</h3>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<img src="@/assets/images/logo.png" alt="">
|
||||
<div style="display: flex; justify-content: center; align-items: center">
|
||||
<!-- <img src="@/assets/images/logo.png" alt="" /> -->
|
||||
</div>
|
||||
|
||||
|
||||
<LangSelect title="多语言设置" class="langSet" />
|
||||
|
||||
<div style="padding: 0 25px 5px 25px">
|
||||
@ -256,7 +256,7 @@ getCookie()
|
||||
height: 160px;
|
||||
line-height: 160px;
|
||||
}
|
||||
.logo{
|
||||
.logo {
|
||||
position: absolute;
|
||||
left: 5%;
|
||||
top: 10%;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
476
src/views/qualityManagement/ProductTraceProcessParameters.vue
Normal file
476
src/views/qualityManagement/ProductTraceProcessParameters.vue
Normal file
@ -0,0 +1,476 @@
|
||||
<!--
|
||||
* @Descripttion: (工艺参数采集/product_trace_process_parameters)
|
||||
* @Author: (admin)
|
||||
* @Date: (2026-01-13)
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
||||
<el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 工具区域 -->
|
||||
<el-row :gutter="15" class="mb10">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" v-hasPermi="['producttraceprocessparameters:add']" plain icon="plus" @click="handleAdd">
|
||||
{{ $t('btn.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
:data="dataList"
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
border
|
||||
header-cell-class-name="el-table-header-cell"
|
||||
highlight-current-row
|
||||
@sort-change="sortChange"
|
||||
>
|
||||
<el-table-column prop="dataType" label="数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等" align="center" v-if="columns.showColumn('dataType')">
|
||||
<template #default="scope">
|
||||
<dict-tag :options=" options.dataTypeOptions" :value="scope.row.dataType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="updatedTime" label="更新时间" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedTime')"/>
|
||||
<el-table-column prop="createdTime" label="创建时间" :show-overflow-tooltip="true" v-if="columns.showColumn('createdTime')"/>
|
||||
<el-table-column prop="updatedby" label="更新人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedby')"/>
|
||||
<el-table-column prop="createdby" label="创建人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('createdby')"/>
|
||||
<el-table-column prop="operator" label="操作人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('operator')"/>
|
||||
<el-table-column prop="collectTime" label="采集时间" :show-overflow-tooltip="true" v-if="columns.showColumn('collectTime')"/>
|
||||
<el-table-column prop="result" label="1 是合格 0是不合格" align="center" v-if="columns.showColumn('result')"/>
|
||||
<el-table-column prop="maxValue" label="最大允许值(用于报警/校验)" align="center" v-if="columns.showColumn('maxValue')"/>
|
||||
<el-table-column prop="minValue" label="最小允许值(用于报警/校验)" align="center" v-if="columns.showColumn('minValue')"/>
|
||||
<el-table-column prop="standardValue" label="标准/目标值(如目标温度 200.0 ℃)" align="center" v-if="columns.showColumn('standardValue')"/>
|
||||
<el-table-column prop="unit" label="单位,如:℃、MPa、秒、mm" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('unit')"/>
|
||||
<el-table-column prop="id" label="主键" align="center" v-if="columns.showColumn('id')"/>
|
||||
<el-table-column prop="description" label="参数描述,如:模具温度,用于热压工序" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('description')"/>
|
||||
<el-table-column prop="plcPoint" label="plc点位" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('plcPoint')"/>
|
||||
<el-table-column prop="parameterName" label="显示名称(用于UI展示,可和name一样)" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('parameterName')"/>
|
||||
<el-table-column prop="parameterCode" label="参数名称,如:温度、压力、时间" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('parameterCode')"/>
|
||||
<el-table-column prop="workstationCode" label="工站code" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('workstationCode')"/>
|
||||
<el-table-column prop="productlinebodyCode" label="产线code" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('productlinebodyCode')"/>
|
||||
<el-table-column prop="flowCode" label="流程code" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('flowCode')"/>
|
||||
<el-table-column prop="operationCode" label="工序号" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('operationCode')"/>
|
||||
<el-table-column prop="routingCode" label="工艺路线编码" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('routingCode')"/>
|
||||
<el-table-column prop="productSn" label="产品SN" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('productSn')"/>
|
||||
<el-table-column prop="workorder" label="工单号" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('workorder')"/>
|
||||
<el-table-column label="操作" width="160">
|
||||
<template #default="scope">
|
||||
<el-button type="success" size="small" icon="edit" title="编辑" v-hasPermi="['producttraceprocessparameters:edit']" @click="handleUpdate(scope.row)"></el-button>
|
||||
<el-button type="danger" size="small" icon="delete" title="删除" v-hasPermi="['producttraceprocessparameters:delete']" @click="handleDelete(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
|
||||
<el-dialog :title="title" :lock-scroll="false" v-model="open" >
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row :gutter="20">
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等" prop="dataType">
|
||||
<el-select v-model="form.dataType" placeholder="请选择数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等">
|
||||
<el-option
|
||||
v-for="item in options.dataTypeOptions"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="更新时间" prop="updatedTime">
|
||||
<el-date-picker
|
||||
v-model="form.updatedTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="创建时间" prop="createdTime">
|
||||
<el-date-picker
|
||||
v-model="form.createdTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="更新人" prop="updatedby">
|
||||
<el-input v-model="form.updatedby" placeholder="请输入更新人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="创建人" prop="createdby">
|
||||
<el-input v-model="form.createdby" placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="操作人" prop="operator">
|
||||
<el-input v-model="form.operator" placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="采集时间" prop="collectTime">
|
||||
<el-date-picker
|
||||
v-model="form.collectTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="1 是合格 0是不合格" prop="result">
|
||||
<el-input v-model.number="form.result" placeholder="请输入1 是合格 0是不合格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="最大允许值(用于报警/校验)" prop="maxValue">
|
||||
<el-input v-model="form.maxValue" placeholder="请输入最大允许值(用于报警/校验)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="最小允许值(用于报警/校验)" prop="minValue">
|
||||
<el-input v-model="form.minValue" placeholder="请输入最小允许值(用于报警/校验)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="标准/目标值(如目标温度 200.0 ℃)" prop="standardValue">
|
||||
<el-input v-model="form.standardValue" placeholder="请输入标准/目标值(如目标温度 200.0 ℃)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="单位,如:℃、MPa、秒、mm" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位,如:℃、MPa、秒、mm" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="参数描述,如:模具温度,用于热压工序" prop="description">
|
||||
<el-input v-model="form.description" placeholder="请输入参数描述,如:模具温度,用于热压工序" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="plc点位" prop="plcPoint">
|
||||
<el-input v-model="form.plcPoint" placeholder="请输入plc点位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="显示名称(用于UI展示,可和name一样)" prop="parameterName">
|
||||
<el-input v-model="form.parameterName" placeholder="请输入显示名称(用于UI展示,可和name一样)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="参数名称,如:温度、压力、时间" prop="parameterCode">
|
||||
<el-input v-model="form.parameterCode" placeholder="请输入参数名称,如:温度、压力、时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="工站code" prop="workstationCode">
|
||||
<el-input v-model="form.workstationCode" placeholder="请输入工站code" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="产线code" prop="productlinebodyCode">
|
||||
<el-input v-model="form.productlinebodyCode" placeholder="请输入产线code" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="流程code" prop="flowCode">
|
||||
<el-input v-model="form.flowCode" placeholder="请输入流程code" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="工序号" prop="operationCode">
|
||||
<el-input v-model="form.operationCode" placeholder="请输入工序号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="工艺路线编码" prop="routingCode">
|
||||
<el-input v-model="form.routingCode" placeholder="请输入工艺路线编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="产品SN" prop="productSn">
|
||||
<el-input v-model="form.productSn" placeholder="请输入产品SN" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="工单号" prop="workorder">
|
||||
<el-input v-model="form.workorder" placeholder="请输入工单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer v-if="opertype != 3">
|
||||
<el-button text @click="cancel">{{ $t('btn.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="state.submitLoading" @click="submitForm">{{ $t('btn.submit') }}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="producttraceprocessparameters">
|
||||
import { listProductTraceProcessParameters,
|
||||
addProductTraceProcessParameters, delProductTraceProcessParameters,
|
||||
updateProductTraceProcessParameters,getProductTraceProcessParameters,
|
||||
}
|
||||
from '@/api/mes/producttraceprocessparameters.js'
|
||||
const { proxy } = getCurrentInstance()
|
||||
const ids = ref([])
|
||||
const loading = ref(false)
|
||||
const showSearch = ref(true)
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sort: '',
|
||||
sortType: 'asc',
|
||||
})
|
||||
const columns = ref([
|
||||
{ visible: true, align: 'center', type: 'dict', prop: 'dataType', label: '数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'updatedTime', label: '更新时间' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'createdTime', label: '创建时间' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'updatedby', label: '更新人' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'createdby', label: '创建人' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'operator', label: '操作人' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'collectTime', label: '采集时间' ,showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'result', label: '1 是合格 0是不合格' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'maxValue', label: '最大允许值(用于报警/校验)' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'minValue', label: '最小允许值(用于报警/校验)' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'standardValue', label: '标准/目标值(如目标温度 200.0 ℃)' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'unit', label: '单位,如:℃、MPa、秒、mm' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'id', label: '主键' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'description', label: '参数描述,如:模具温度,用于热压工序' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'plcPoint', label: 'plc点位' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'parameterName', label: '显示名称(用于UI展示,可和name一样)' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'parameterCode', label: '参数名称,如:温度、压力、时间' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'workstationCode', label: '工站code' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'productlinebodyCode', label: '产线code' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'flowCode', label: '流程code' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'operationCode', label: '工序号' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'routingCode', label: '工艺路线编码' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'productSn', label: '产品SN' ,showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'workorder', label: '工单号' ,showOverflowTooltip: true },
|
||||
//{ visible: false, prop: 'actions', label: '操作', type: 'slot', width: '160' }
|
||||
])
|
||||
const total = ref(0)
|
||||
const dataList = ref([])
|
||||
const queryRef = ref()
|
||||
const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
|
||||
|
||||
|
||||
var dictParams = [
|
||||
]
|
||||
|
||||
|
||||
function getList(){
|
||||
loading.value = true
|
||||
listProductTraceProcessParameters(queryParams).then(res => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
dataList.value = data.result
|
||||
total.value = data.totalNum
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询
|
||||
function handleQuery() {
|
||||
queryParams.pageNum = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
// 重置查询操作
|
||||
function resetQuery(){
|
||||
proxy.resetForm("queryRef")
|
||||
handleQuery()
|
||||
}
|
||||
// 自定义排序
|
||||
function sortChange(column) {
|
||||
var sort = undefined
|
||||
var sortType = undefined
|
||||
|
||||
if (column.prop != null && column.order != null) {
|
||||
sort = column.prop
|
||||
sortType = column.order
|
||||
|
||||
}
|
||||
queryParams.sort = sort
|
||||
queryParams.sortType = sortType
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/*************** form操作 ***************/
|
||||
const formRef = ref()
|
||||
const title = ref('')
|
||||
// 操作类型 1、add 2、edit 3、view
|
||||
const opertype = ref(0)
|
||||
const open = ref(false)
|
||||
const state = reactive({
|
||||
single: true,
|
||||
multiple: true,
|
||||
submitLoading: false,
|
||||
form: {},
|
||||
rules: {
|
||||
dataType: [{ required: true, message: "数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等不能为空", trigger: "change" }],
|
||||
parameterCode: [{ required: true, message: "参数名称,如:温度、压力、时间不能为空", trigger: "blur" }],
|
||||
},
|
||||
options: {
|
||||
// 数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||
dataTypeOptions: [],
|
||||
}
|
||||
})
|
||||
|
||||
const { form, rules, options, single, multiple } = toRefs(state)
|
||||
|
||||
// 关闭dialog
|
||||
function cancel(){
|
||||
open.value = false
|
||||
reset()
|
||||
}
|
||||
|
||||
// 重置表单
|
||||
function reset() {
|
||||
form.value = {
|
||||
dataType: null,
|
||||
updatedTime: null,
|
||||
createdTime: null,
|
||||
updatedby: null,
|
||||
createdby: null,
|
||||
operator: null,
|
||||
collectTime: null,
|
||||
result: null,
|
||||
maxValue: null,
|
||||
minValue: null,
|
||||
standardValue: null,
|
||||
unit: null,
|
||||
id: null,
|
||||
description: null,
|
||||
plcPoint: null,
|
||||
parameterName: null,
|
||||
parameterCode: null,
|
||||
workstationCode: null,
|
||||
productlinebodyCode: null,
|
||||
flowCode: null,
|
||||
operationCode: null,
|
||||
routingCode: null,
|
||||
productSn: null,
|
||||
workorder: null,
|
||||
};
|
||||
proxy.resetForm("formRef")
|
||||
}
|
||||
|
||||
|
||||
// 添加按钮操作
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true
|
||||
state.submitLoading = false
|
||||
title.value = '添加工艺参数采集'
|
||||
opertype.value = 1
|
||||
}
|
||||
// 修改按钮操作
|
||||
function handleUpdate(row) {
|
||||
reset()
|
||||
const id = row.id || ids.value
|
||||
getProductTraceProcessParameters(id).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
open.value = true
|
||||
title.value = '修改工艺参数采集'
|
||||
opertype.value = 2
|
||||
|
||||
form.value = {
|
||||
...data,
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 添加&修改 表单提交
|
||||
function submitForm() {
|
||||
proxy.$refs["formRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
state.submitLoading = true
|
||||
|
||||
if (form.value.id != undefined && opertype.value === 2) {
|
||||
updateProductTraceProcessParameters(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess("修改成功")
|
||||
open.value = false
|
||||
getList()
|
||||
})
|
||||
.finally(() => {
|
||||
state.submitLoading = false
|
||||
})
|
||||
} else {
|
||||
addProductTraceProcessParameters(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess("新增成功")
|
||||
open.value = false
|
||||
getList()
|
||||
})
|
||||
.finally(() => {
|
||||
setTimeout(() => {
|
||||
state.submitLoading = false
|
||||
}, 800)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除按钮操作
|
||||
function handleDelete(row) {
|
||||
const Ids = row.id || ids.value
|
||||
|
||||
proxy
|
||||
.$confirm('是否确认删除参数编号为"' + Ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: proxy.$t('common.ok'),
|
||||
cancelButtonText: proxy.$t('common.cancel'),
|
||||
type: "warning",
|
||||
})
|
||||
.then(function () {
|
||||
return delProductTraceProcessParameters(Ids)
|
||||
})
|
||||
.then(() => {
|
||||
getList()
|
||||
proxy.$modal.msgSuccess("删除成功")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
handleQuery()
|
||||
</script>
|
||||
@ -46,7 +46,7 @@ export default defineConfig(({ mode, command }) => {
|
||||
},
|
||||
// vite 相关配置
|
||||
server: {
|
||||
port: 8887,
|
||||
port: 8877,
|
||||
host: true,
|
||||
open: true,
|
||||
proxy: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user