From 581b8309996c37ca5025e6e1ad4b3a8a87b943b8 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期六, 16 五月 2026 16:11:14 +0800
Subject: [PATCH] feat(ai): 为AI工业大脑增加生产助手及制造数据结构化展示功能
---
src/components/ProcessParamListDialog.vue | 32 +++++++++++++++++++++++++++++---
1 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/src/components/ProcessParamListDialog.vue b/src/components/ProcessParamListDialog.vue
index 898abb0..deee249 100644
--- a/src/components/ProcessParamListDialog.vue
+++ b/src/components/ProcessParamListDialog.vue
@@ -130,6 +130,7 @@
</el-form-item>
<el-form-item label="鏍囧噯鍊�">
<el-input v-model="selectedParam.standardValue"
+ @input="val => onStandardValueInput(val, selectedParam)"
placeholder="璇疯緭鍏ラ粯璁ゅ��" />
</el-form-item>
<el-form-item label="鏄惁蹇呭~">
@@ -144,9 +145,9 @@
</div>
</div>
<template #footer>
- <el-button @click="selectParamDialogVisible = false">鍙栨秷</el-button>
<el-button type="primary"
@click="handleParamSelectSubmit">纭畾</el-button>
+ <el-button @click="selectParamDialogVisible = false">鍙栨秷</el-button>
</template>
</el-dialog>
<!-- 缂栬緫鍙傛暟瀵硅瘽妗� -->
@@ -175,13 +176,14 @@
<el-form-item label="鏍囧噯鍊�"
prop="standardValue">
<el-input v-model="editParamForm.standardValue"
+ @input="val => onStandardValueInput(val, editParamForm)"
placeholder="璇疯緭鍏ユ爣鍑嗗��" />
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="editParamDialogVisible = false">鍙栨秷</el-button>
<el-button type="primary"
@click="handleEditParamSubmit">纭畾</el-button>
+ <el-button @click="editParamDialogVisible = false">鍙栨秷</el-button>
</template>
</el-dialog>
</el-dialog>
@@ -268,8 +270,32 @@
paramFormat: "",
unit: "",
});
+
+ const onStandardValueInput = (val, target) => {
+ const data = target.value || target;
+ const type = data.paramType || data.parameterType;
+ if (type === 1) {
+ // 鏁板�兼牸寮忥細涓嶈兘杈撳叆涓枃鎴栬嫳鏂囧瓧绗�
+ data.standardValue = val.replace(/[a-zA-Z\u4e00-\u9fa5]/g, "");
+ }
+ };
+
const editParamRules = ref({
- // standardValue: [{ required: true, message: "璇疯緭鍏ユ爣鍑嗗��", trigger: "blur" }],
+ standardValue: [
+ {
+ validator: (rule, value, callback) => {
+ const type =
+ editParamForm.value.paramType || editParamForm.value.parameterType;
+ if (type === 1 && value) {
+ if (/[a-zA-Z\u4e00-\u9fa5]/.test(value)) {
+ return callback(new Error("鏁板�兼牸寮忎笉鑳藉寘鍚腑鑻辨枃瀛楃"));
+ }
+ }
+ callback();
+ },
+ trigger: "blur",
+ },
+ ],
});
const editParamFormRef = ref(null);
--
Gitblit v1.9.3