fix: 导入缺失的ElMessage组件

修复 EvaluationTemplateForm.vue 中 message 未定义的问题
This commit is contained in:
tangweijie 2026-01-28 10:46:15 +08:00
parent 44fa196bd7
commit 5b41d2b23d
3 changed files with 8 additions and 4 deletions

View File

@ -70,10 +70,9 @@ service.interceptors.request.use(
}
}
// 监狱系统:即使 tenantEnable 为 false也尝试获取并设置租户 ID
const tenantId = getTenantId()
if (tenantId) {
config.headers['tenant-id'] = tenantId
}
// 如果缓存中没有租户 ID使用默认值 1
const tenantId = getTenantId() || 1
config.headers['tenant-id'] = tenantId
const method = config.method?.toUpperCase()
// 防止 GET 请求缓存
if (method === 'GET') {

View File

@ -351,6 +351,10 @@ watch(
onMounted(() => {
getLoginFormCache()
getTenantByWebsite()
// ID - ID
if (!authUtil.getTenantId()) {
authUtil.setTenantId(Number(loginData.loginForm.tenantName) || 1)
}
})
</script>

View File

@ -77,6 +77,7 @@
<script lang="ts" setup>
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { EvaluationTemplateApi } from '@/api/prison/evaluation'
import { ElMessage } from 'element-plus'
defineOptions({ name: 'EvaluationTemplateForm' })