This commit is contained in:
sjl
2025-03-11 11:30:52 +08:00
parent e2559ffa65
commit 7470f697bd
2 changed files with 23 additions and 13 deletions

View File

@@ -18,7 +18,7 @@
</el-select>
</el-form-item>
<el-form-item label='检测脚本' prop='scriptId'>
<el-select v-model="controlContent.scriptId" collapse-tags placeholder="请选择检测脚本">
<el-select v-model="controlContent.scriptId" collapse-tags placeholder="请选择检测脚本" @change="handleScriptChange">
<el-option
v-for="(option, index) in scriptArray"
:key="index"
@@ -293,7 +293,18 @@ const handleActiveIndexChange = (newActiveIndex: number) => {
scriptIndex.value = newActiveIndex
}
// 定义 handleScriptChange 方法
const handleScriptChange = (value: string) => {
// 根据业务需求实现具体逻辑
console.log('检测脚本变更:', value);
router.push({
path: '/machine/controlSource',
state: { title: '新增检测脚本', row: '', mode: modeStore.currentMode }
})
}
const start = async () => {
controlContent.value.userPageId = 'cdf'
controlContent.value.scriptIndex = scriptIndex.value
await checkSimulate(controlContent.value)