测试用例修改

This commit is contained in:
sjl
2025-07-28 13:24:01 +08:00
parent e90cecfb5b
commit 6305a38e9d
8 changed files with 61 additions and 25 deletions

View File

@@ -124,9 +124,15 @@ const tableStore = new TableStore({
})
})
} else {
deleteDept([row.id]).then(response => {
ElMessage.success('删除成功')
tableStore.index()
ElMessageBox.confirm('是否确认删除该部门', '提示', {
confirmButtonText: '确认删除',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteDept([row.id]).then(response => {
ElMessage.success('删除成功')
tableStore.index()
})
})
}
}

View File

@@ -6,7 +6,7 @@
<el-input v-model="form.code" placeholder="请输入部门编号"></el-input>
</el-form-item>
<el-form-item class="top" label="部门名称:" prop="name">
<el-input v-model="form.name" placeholder="请输入部门名称"></el-input>
<el-input v-model="form.name" placeholder="请输入部门名称" maxlength="32" show-word-limit clearable @input="handleInput"/>
</el-form-item>
<el-form-item class="top" label="部门类型:" prop="type">
<el-select v-model="form.type" placeholder="选择部门类型" style="width: 100%">
@@ -144,5 +144,14 @@ const submit = () => {
})
}
const handleInput = ( value: string) => {
// 过滤空格
const filteredValue = value.replace(/\s/g, '')
if (filteredValue !== value) {
form.name = filteredValue
}
}
defineExpose({ open })
</script>