fix: 导入缺失的ElMessage组件
修复 EvaluationTemplateForm.vue 中 message 未定义的问题
This commit is contained in:
parent
44fa196bd7
commit
5b41d2b23d
@ -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') {
|
||||
|
||||
@ -351,6 +351,10 @@ watch(
|
||||
onMounted(() => {
|
||||
getLoginFormCache()
|
||||
getTenantByWebsite()
|
||||
// 初始化租户 ID - 确保登录前缓存中有租户 ID
|
||||
if (!authUtil.getTenantId()) {
|
||||
authUtil.setTenantId(Number(loginData.loginForm.tenantName) || 1)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@ -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' })
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user