| | |
| | | </el-icon>新增工序 |
| | | </el-button> |
| | | </div> |
| | | <div class="process-card-list"> |
| | | <div v-for="process in processList" |
| | | <div class="process-card-list" |
| | | v-loading="processLoading"> |
| | | <div v-for="process in processValueList" |
| | | :key="process.id" |
| | | class="process-card" |
| | | :class="{ active: selectedProcess?.id === process.id }" |
| | | @click="selectProcess(process)"> |
| | | <div class="card-header"> |
| | | <span class="process-code">{{ process.processCode }}</span> |
| | | <div class="process-name">{{ process.name }} <span class="process-code">{{ process.no }}</span></div> |
| | | <div class="card-actions"> |
| | | <el-button link |
| | | type="primary" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="card-body"> |
| | | <div class="process-name">{{ process.processName }}</div> |
| | | <div class="process-desc">{{ process.processDesc || '暂无描述' }}</div> |
| | | <!-- <div class="process-name">{{ process.name }}</div> --> |
| | | <div class="process-desc">{{ process.remark || '暂无描述' }}</div> |
| | | </div> |
| | | <div class="card-footer"> |
| | | <el-tag size="small" |
| | | :type="process.status === '1' ? 'success' : 'info'"> |
| | | {{ process.status === '1' ? '启用' : '停用' }} |
| | | </el-tag> |
| | | <span class="param-count">参数: {{ process.paramCount || 0 }}个</span> |
| | | <div class="status-tag"> <el-tag size="small" |
| | | :type="process.status ? 'success' : 'info'"> |
| | | {{ process.status ? '启用' : '停用' }} |
| | | </el-tag> |
| | | <el-tag size="small" |
| | | :type="process.isQuality ? 'warning' : 'info'" |
| | | style="margin-left: 8px"> |
| | | {{ process.isQuality ? '质检' : '非质检' }} |
| | | </el-tag> |
| | | </div> |
| | | <span class="param-count">工资定额: ¥{{ process.salaryQuota || 0 }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="param-list-section"> |
| | | <div class="section-header"> |
| | | <h3 class="section-title"> |
| | | {{ selectedProcess ? selectedProcess.processName + ' - 参数配置' : '请选择工序' }} |
| | | {{ selectedProcess ? selectedProcess.name + ' - 参数配置' : '请选择工序' }} |
| | | </h3> |
| | | <el-button type="primary" |
| | | size="small" |
| | |
| | | ref="processFormRef" |
| | | label-width="100px"> |
| | | <el-form-item label="工序编码" |
| | | prop="processCode"> |
| | | <el-input v-model="processForm.processCode" |
| | | prop="no"> |
| | | <el-input v-model="processForm.no" |
| | | placeholder="请输入工序编码" /> |
| | | </el-form-item> |
| | | <el-form-item label="工序名称" |
| | | prop="processName"> |
| | | <el-input v-model="processForm.processName" |
| | | prop="name"> |
| | | <el-input v-model="processForm.name" |
| | | placeholder="请输入工序名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="工资定额" |
| | | prop="salaryQuota"> |
| | | <el-input v-model="processForm.salaryQuota" |
| | | type="number" |
| | | :step="0.001" /> |
| | | </el-form-item> |
| | | <el-form-item label="是否质检" |
| | | prop="isQuality"> |
| | | <el-switch v-model="processForm.isQuality" |
| | | :active-value="true" |
| | | inactive-value="false" /> |
| | | </el-form-item> |
| | | <el-form-item label="工序描述" |
| | | prop="processDesc"> |
| | | <el-input v-model="processForm.processDesc" |
| | | prop="remark"> |
| | | <el-input v-model="processForm.remark" |
| | | type="textarea" |
| | | :rows="3" |
| | | placeholder="请输入工序描述" /> |
| | |
| | | <el-form-item label="状态" |
| | | prop="status"> |
| | | <el-radio-group v-model="processForm.status"> |
| | | <el-radio label="1">启用</el-radio> |
| | | <el-radio label="0">停用</el-radio> |
| | | <el-radio :label="true">启用</el-radio> |
| | | <el-radio :label="false">停用</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | <el-table-column prop="parameterCode" |
| | | label="参数编号" |
| | | width="100" /> |
| | | <el-table-column prop="parameterName" |
| | | <el-table-column prop="paramName" |
| | | label="参数名称" /> |
| | | <el-table-column prop="parameterType" |
| | | <el-table-column prop="paramType" |
| | | label="参数类型" |
| | | width="100"> |
| | | <template #default="scope"> |
| | | <el-tag size="small" |
| | | :type="getParamTypeTag(scope.row.parameterType)"> |
| | | {{ scope.row.parameterType }} |
| | | :type="getParamTypeTag(scope.row.paramType)"> |
| | | {{ scope.row.paramType }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <span class="detail-text">{{ selectedParam.parameterCode }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="参数名称"> |
| | | <span class="detail-text">{{ selectedParam.parameterName }}</span> |
| | | <span class="detail-text">{{ selectedParam.paramName }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="参数模式"> |
| | | <el-tag size="small" |
| | | :type="selectedParam.parameterType2 === '1' ? 'success' : 'warning'"> |
| | | {{ selectedParam.parameterType2 === '1' ? '单值' : '区间' }} |
| | | :type="selectedParam.valueMode == '1' ? 'success' : 'warning'"> |
| | | {{ selectedParam.valueMode == '1' ? '单值' : '区间' }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | <el-form-item label="参数类型"> |
| | | <el-tag size="small" |
| | | :type="getParamTypeTag(selectedParam.parameterType)"> |
| | | {{ selectedParam.parameterType }} |
| | | :type="getParamTypeTag(selectedParam.paramType)"> |
| | | {{ selectedParam.paramType }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | <el-form-item label="参数格式"> |
| | | <span class="detail-text">{{ selectedParam.parameterFormat || '-' }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="标准值"> |
| | | <span class="detail-text">{{ selectedParam.standardValue }}</span> |
| | | <span class="detail-text">{{ selectedParam.paramFormat || '-' }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="单位"> |
| | | <span class="detail-text">{{ selectedParam.unit || '-' }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="默认值" |
| | | v-if="selectedParam.valueMode === '1'"> |
| | | <el-input v-model="selectedParam.defaultValue" |
| | | placeholder="请输入默认值" /> |
| | | </el-form-item> |
| | | <el-form-item label="最小值" |
| | | v-if="selectedParam.valueMode === '2'"> |
| | | <el-input v-model="selectedParam.defaultMin" |
| | | placeholder="请输入最小值" /> |
| | | </el-form-item> |
| | | <el-form-item label="最大值" |
| | | v-if="selectedParam.valueMode === '2'"> |
| | | <el-input v-model="selectedParam.defaultMax" |
| | | placeholder="请输入最大值" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-empty v-else |
| | |
| | | import { Plus, Edit, Delete, Search } from "@element-plus/icons-vue"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | import { listType } from "@/api/system/dict/type"; |
| | | import { |
| | | add, |
| | | update, |
| | | del, |
| | | list as getProcessListApi, |
| | | processList, |
| | | } from "@/api/productionManagement/productionProcess.js"; |
| | | |
| | | // 工序列表数据 |
| | | const processList = ref([]); |
| | | const processValueList = ref([]); |
| | | const selectedProcess = ref(null); |
| | | const processLoading = ref(false); |
| | | |
| | |
| | | const processFormRef = ref(null); |
| | | const processForm = reactive({ |
| | | id: null, |
| | | processCode: "", |
| | | processName: "", |
| | | processDesc: "", |
| | | status: "1", |
| | | no: "", |
| | | name: "", |
| | | salaryQuota: null, |
| | | isQuality: false, |
| | | remark: "", |
| | | status: true, |
| | | }); |
| | | const processRules = { |
| | | processCode: [{ required: true, message: "请输入工序编码", trigger: "blur" }], |
| | | processName: [{ required: true, message: "请输入工序名称", trigger: "blur" }], |
| | | no: [{ required: true, message: "请输入工序编码", trigger: "blur" }], |
| | | name: [{ required: true, message: "请输入工序名称", trigger: "blur" }], |
| | | salaryQuota: [ |
| | | { |
| | | required: true, |
| | | message: "请输入工资定额", |
| | | trigger: "blur", |
| | | validator: (rule, value, callback) => { |
| | | if (value === null || value === undefined || value === "") { |
| | | callback(new Error("请输入工资定额")); |
| | | } else if (isNaN(value) || value < 0) { |
| | | callback(new Error("工资定额必须是非负数字")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | |
| | | // 参数对话框 |
| | |
| | | }, |
| | | { |
| | | label: "参数名称", |
| | | prop: "parameterName", |
| | | prop: "paramName", |
| | | }, |
| | | { |
| | | label: "参数模式", |
| | | prop: "parameterType2", |
| | | prop: "valueMode", |
| | | dataType: "tag", |
| | | formatType: row => (row.parameterType2 === "1" ? "success" : "warning"), |
| | | formatData: row => (row.parameterType2 === "1" ? "单值" : "区间"), |
| | | formatType: row => (row.valueMode === "1" ? "success" : "warning"), |
| | | formatData: row => (row.valueMode === "1" ? "单值" : "区间"), |
| | | }, |
| | | { |
| | | label: "参数类型", |
| | | prop: "parameterType", |
| | | prop: "paramType", |
| | | dataType: "tag", |
| | | formatType: row => { |
| | | const typeMap = { |
| | |
| | | 下拉选项: "warning", |
| | | 时间格式: "success", |
| | | }; |
| | | return typeMap[row.parameterType] || "default"; |
| | | return typeMap[row.paramType] || "default"; |
| | | }, |
| | | }, |
| | | { |
| | | label: "参数格式", |
| | | prop: "parameterFormat", |
| | | prop: "paramFormat", |
| | | }, |
| | | { |
| | | label: "标准值", |
| | | prop: "standardValue", |
| | | className: row => (row.parameterType === "数值格式" ? "quantity-cell" : ""), |
| | | prop: "defaultValue", |
| | | className: row => (row.paramType === "数值格式" ? "quantity-cell" : ""), |
| | | }, |
| | | { |
| | | label: "默认值", |
| | | prop: "defaultValue", |
| | | formatData: (val, row) => { |
| | | return row.valueMode === "1" ? val : "-"; |
| | | }, |
| | | }, |
| | | { |
| | | label: "最小值", |
| | | prop: "defaultMin", |
| | | formatData: (val, row) => { |
| | | return row.valueMode === "2" ? val : "-"; |
| | | }, |
| | | }, |
| | | { |
| | | label: "最大值", |
| | | prop: "defaultMax", |
| | | formatData: (val, row) => { |
| | | return row.valueMode === "2" ? val : "-"; |
| | | }, |
| | | }, |
| | | { |
| | | label: "单位", |
| | |
| | | |
| | | // 获取工序列表 |
| | | const getProcessList = () => { |
| | | // 假数据 |
| | | processList.value = [ |
| | | { |
| | | id: 1, |
| | | processCode: "PROC001", |
| | | processName: "原料配比", |
| | | processDesc: "原材料配比工序", |
| | | status: "1", |
| | | paramCount: 3, |
| | | }, |
| | | { |
| | | id: 2, |
| | | processCode: "PROC002", |
| | | processName: "搅拌混合", |
| | | processDesc: "搅拌混合工序", |
| | | status: "1", |
| | | paramCount: 2, |
| | | }, |
| | | { |
| | | id: 3, |
| | | processCode: "PROC003", |
| | | processName: "浇筑成型", |
| | | processDesc: "浇筑成型工序", |
| | | status: "1", |
| | | paramCount: 4, |
| | | }, |
| | | { |
| | | id: 4, |
| | | processCode: "PROC004", |
| | | processName: "蒸压养护", |
| | | processDesc: "蒸压养护工序", |
| | | status: "0", |
| | | paramCount: 2, |
| | | }, |
| | | { |
| | | id: 5, |
| | | processCode: "PROC005", |
| | | processName: "切割加工", |
| | | processDesc: "切割加工工序", |
| | | status: "1", |
| | | paramCount: 3, |
| | | }, |
| | | ]; |
| | | processLoading.value = true; |
| | | getProcessListApi() |
| | | .then(res => { |
| | | processValueList.value = res.data || []; |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error("获取工序列表失败"); |
| | | }) |
| | | .finally(() => { |
| | | processLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | // 获取参数列表 |
| | | const getParamList = processId => { |
| | | paramLoading.value = true; |
| | | // 假数据 |
| | | setTimeout(() => { |
| | | paramLoading.value = false; |
| | | const mockData = { |
| | | 1: [ |
| | | { |
| | | id: 1, |
| | | parameterCode: "P001", |
| | | parameterName: "水泥比例", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "30", |
| | | unit: "%", |
| | | }, |
| | | { |
| | | id: 2, |
| | | parameterCode: "P002", |
| | | parameterName: "砂比例", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "60", |
| | | unit: "%", |
| | | }, |
| | | { |
| | | id: 3, |
| | | parameterCode: "P003", |
| | | parameterName: "水比例", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "10", |
| | | unit: "%", |
| | | }, |
| | | ], |
| | | 2: [ |
| | | { |
| | | id: 4, |
| | | parameterCode: "P004", |
| | | parameterName: "搅拌时间", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "5", |
| | | unit: "分钟", |
| | | }, |
| | | { |
| | | id: 5, |
| | | parameterCode: "P005", |
| | | parameterName: "搅拌速度", |
| | | parameterType2: "2", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "100-200", |
| | | unit: "rpm", |
| | | }, |
| | | ], |
| | | 3: [ |
| | | { |
| | | id: 6, |
| | | parameterCode: "P006", |
| | | parameterName: "浇筑温度", |
| | | parameterType2: "2", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "20-30", |
| | | unit: "℃", |
| | | }, |
| | | { |
| | | id: 7, |
| | | parameterCode: "P007", |
| | | parameterName: "浇筑压力", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "0.5", |
| | | unit: "MPa", |
| | | }, |
| | | { |
| | | id: 8, |
| | | parameterCode: "P008", |
| | | parameterName: "成型状态", |
| | | parameterType2: "1", |
| | | parameterType: "下拉选项", |
| | | parameterFormat: "status", |
| | | standardValue: "正常", |
| | | unit: "", |
| | | }, |
| | | { |
| | | id: 9, |
| | | parameterCode: "P009", |
| | | parameterName: "成型时间", |
| | | parameterType2: "1", |
| | | parameterType: "时间格式", |
| | | parameterFormat: "YYYY-MM-DD HH:mm:ss", |
| | | standardValue: "2024-01-01 08:00:00", |
| | | unit: "", |
| | | }, |
| | | ], |
| | | 4: [ |
| | | { |
| | | id: 10, |
| | | parameterCode: "P010", |
| | | parameterName: "蒸压温度", |
| | | parameterType2: "2", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "180-200", |
| | | unit: "℃", |
| | | }, |
| | | { |
| | | id: 11, |
| | | parameterCode: "P011", |
| | | parameterName: "蒸压压力", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "1.2", |
| | | unit: "MPa", |
| | | }, |
| | | ], |
| | | 5: [ |
| | | { |
| | | id: 12, |
| | | parameterCode: "P012", |
| | | parameterName: "切割尺寸", |
| | | parameterType2: "1", |
| | | parameterType: "文本格式", |
| | | parameterFormat: "", |
| | | standardValue: "600x200x100", |
| | | unit: "mm", |
| | | }, |
| | | { |
| | | id: 13, |
| | | parameterCode: "P013", |
| | | parameterName: "切割精度", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "±1", |
| | | unit: "mm", |
| | | }, |
| | | { |
| | | id: 14, |
| | | parameterCode: "P014", |
| | | parameterName: "切割速度", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "2", |
| | | unit: "m/min", |
| | | }, |
| | | ], |
| | | }; |
| | | paramList.value = mockData[processId] || []; |
| | | paramPage.total = paramList.value.length; |
| | | }, 300); |
| | | getProcessParamList(processId) |
| | | .then(res => { |
| | | paramList.value = res.data || []; |
| | | paramPage.total = paramList.value.length; |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error("获取参数列表失败"); |
| | | }) |
| | | .finally(() => { |
| | | paramLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | // 选择工序 |
| | |
| | | const handleAddProcess = () => { |
| | | isProcessEdit.value = false; |
| | | processForm.id = null; |
| | | processForm.processCode = ""; |
| | | processForm.processName = ""; |
| | | processForm.processDesc = ""; |
| | | processForm.status = "1"; |
| | | processForm.no = ""; |
| | | processForm.name = ""; |
| | | processForm.salaryQuota = null; |
| | | processForm.isQuality = false; |
| | | processForm.remark = ""; |
| | | processForm.status = true; |
| | | processDialogVisible.value = true; |
| | | }; |
| | | |
| | | const handleEditProcess = process => { |
| | | isProcessEdit.value = true; |
| | | processForm.id = process.id; |
| | | processForm.processCode = process.processCode; |
| | | processForm.processName = process.processName; |
| | | processForm.processDesc = process.processDesc; |
| | | processForm.no = process.no; |
| | | processForm.name = process.name; |
| | | processForm.salaryQuota = process.salaryQuota; |
| | | processForm.isQuality = process.isQuality || false; |
| | | processForm.remark = process.remark || ""; |
| | | processForm.status = process.status; |
| | | processDialogVisible.value = true; |
| | | }; |
| | |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | ElMessage.success("删除成功"); |
| | | getProcessList(); |
| | | if (selectedProcess.value?.id === process.id) { |
| | | selectedProcess.value = null; |
| | | paramList.value = []; |
| | | } |
| | | del([process.id]) |
| | | .then(() => { |
| | | ElMessage.success("删除成功"); |
| | | getProcessList(); |
| | | if (selectedProcess.value?.id === process.id) { |
| | | selectedProcess.value = null; |
| | | paramList.value = []; |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error("删除失败"); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | const handleProcessSubmit = () => { |
| | | processFormRef.value.validate(valid => { |
| | | if (valid) { |
| | | ElMessage.success(isProcessEdit.value ? "编辑成功" : "新增成功"); |
| | | processDialogVisible.value = false; |
| | | getProcessList(); |
| | | const apiMethod = isProcessEdit.value ? update : add; |
| | | apiMethod(processForm) |
| | | .then(() => { |
| | | ElMessage.success(isProcessEdit.value ? "编辑成功" : "新增成功"); |
| | | processDialogVisible.value = false; |
| | | getProcessList(); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error(isProcessEdit.value ? "编辑失败" : "新增失败"); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | |
| | | { |
| | | id: 101, |
| | | parameterCode: "P101", |
| | | parameterName: "温度", |
| | | parameterType2: "2", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "20-30", |
| | | paramName: "温度", |
| | | valueMode: "2", |
| | | paramType: "数值格式", |
| | | paramFormat: "", |
| | | defaultValue: "20-30", |
| | | unit: "℃", |
| | | }, |
| | | { |
| | | id: 102, |
| | | parameterCode: "P102", |
| | | parameterName: "压力", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "0.5", |
| | | paramName: "压力", |
| | | valueMode: "1", |
| | | paramType: "数值格式", |
| | | paramFormat: "", |
| | | defaultValue: "0.5", |
| | | unit: "MPa", |
| | | }, |
| | | { |
| | | id: 103, |
| | | parameterCode: "P103", |
| | | parameterName: "湿度", |
| | | parameterType2: "2", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "40-60", |
| | | paramName: "湿度", |
| | | valueMode: "2", |
| | | paramType: "数值格式", |
| | | paramFormat: "", |
| | | defaultValue: "40-60", |
| | | unit: "%", |
| | | }, |
| | | { |
| | | id: 104, |
| | | parameterCode: "P104", |
| | | parameterName: "速度", |
| | | parameterType2: "1", |
| | | parameterType: "数值格式", |
| | | parameterFormat: "", |
| | | standardValue: "100", |
| | | paramName: "速度", |
| | | valueMode: "1", |
| | | paramType: "数值格式", |
| | | paramFormat: "", |
| | | defaultValue: "100", |
| | | unit: "m/min", |
| | | }, |
| | | { |
| | | id: 105, |
| | | parameterCode: "P105", |
| | | parameterName: "状态", |
| | | parameterType2: "1", |
| | | parameterType: "下拉选项", |
| | | parameterFormat: "status", |
| | | standardValue: "正常", |
| | | paramName: "状态", |
| | | valueMode: "1", |
| | | paramType: "下拉选项", |
| | | paramFormat: "status", |
| | | defaultValue: "正常", |
| | | unit: "", |
| | | }, |
| | | { |
| | | id: 106, |
| | | parameterCode: "P106", |
| | | parameterName: "记录时间", |
| | | parameterType2: "1", |
| | | parameterType: "时间格式", |
| | | parameterFormat: "YYYY-MM-DD HH:mm:ss", |
| | | standardValue: "2024-01-01 08:00:00", |
| | | paramName: "记录时间", |
| | | valueMode: "1", |
| | | paramType: "时间格式", |
| | | paramFormat: "YYYY-MM-DD HH:mm:ss", |
| | | defaultValue: "2024-01-01 08:00:00", |
| | | unit: "", |
| | | }, |
| | | { |
| | | id: 107, |
| | | parameterCode: "P107", |
| | | parameterName: "备注", |
| | | parameterType2: "1", |
| | | parameterType: "文本格式", |
| | | parameterFormat: "", |
| | | standardValue: "无", |
| | | paramName: "备注", |
| | | valueMode: "1", |
| | | paramType: "文本格式", |
| | | paramFormat: "", |
| | | defaultValue: "无", |
| | | unit: "", |
| | | }, |
| | | ]; |
| | |
| | | filteredParamList.value = availableParamList.value; |
| | | } else { |
| | | filteredParamList.value = availableParamList.value.filter(item => |
| | | item.parameterName.toLowerCase().includes(keyword) |
| | | item.paramName.toLowerCase().includes(keyword) |
| | | ); |
| | | } |
| | | }; |
| | |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | ElMessage.success("删除成功"); |
| | | getParamList(selectedProcess.value.id); |
| | | deleteProcessParam(row.id) |
| | | .then(() => { |
| | | ElMessage.success("删除成功"); |
| | | getParamList(selectedProcess.value.id); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error("删除失败"); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | |
| | | ElMessage.warning("请先选择一个参数"); |
| | | return; |
| | | } |
| | | ElMessage.success("添加成功"); |
| | | paramDialogVisible.value = false; |
| | | getParamList(selectedProcess.value.id); |
| | | addProcessParam({ |
| | | processId: selectedProcess.value.id, |
| | | paramId: selectedParam.value.id, |
| | | defaultValue: selectedParam.value.defaultValue, |
| | | defaultMin: selectedParam.value.defaultMin, |
| | | defaultMax: selectedParam.value.defaultMax, |
| | | }) |
| | | .then(() => { |
| | | ElMessage.success("添加成功"); |
| | | paramDialogVisible.value = false; |
| | | getParamList(selectedProcess.value.id); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error("添加失败"); |
| | | }); |
| | | }; |
| | | |
| | | const handleParamPagination = obj => { |
| | |
| | | |
| | | .process-code { |
| | | font-size: 12px; |
| | | color: #909399; |
| | | // color: #909399; |
| | | color: #cb9b18; |
| | | font-family: "Courier New", monospace; |
| | | } |
| | | |