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
|
// 监狱系统:即使 tenantEnable 为 false,也尝试获取并设置租户 ID
|
||||||
const tenantId = getTenantId()
|
// 如果缓存中没有租户 ID,使用默认值 1
|
||||||
if (tenantId) {
|
const tenantId = getTenantId() || 1
|
||||||
config.headers['tenant-id'] = tenantId
|
config.headers['tenant-id'] = tenantId
|
||||||
}
|
|
||||||
const method = config.method?.toUpperCase()
|
const method = config.method?.toUpperCase()
|
||||||
// 防止 GET 请求缓存
|
// 防止 GET 请求缓存
|
||||||
if (method === 'GET') {
|
if (method === 'GET') {
|
||||||
|
|||||||
@ -351,6 +351,10 @@ watch(
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getLoginFormCache()
|
getLoginFormCache()
|
||||||
getTenantByWebsite()
|
getTenantByWebsite()
|
||||||
|
// 初始化租户 ID - 确保登录前缓存中有租户 ID
|
||||||
|
if (!authUtil.getTenantId()) {
|
||||||
|
authUtil.setTenantId(Number(loginData.loginForm.tenantName) || 1)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
import { EvaluationTemplateApi } from '@/api/prison/evaluation'
|
import { EvaluationTemplateApi } from '@/api/prison/evaluation'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
defineOptions({ name: 'EvaluationTemplateForm' })
|
defineOptions({ name: 'EvaluationTemplateForm' })
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user