fix: 修复通知渠道页面租户下拉字段不匹配
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
租户 API 返回 code/name,修正前端使用正确字段
This commit is contained in:
@@ -155,8 +155,8 @@ async function handleTest(row) {
|
||||
}
|
||||
|
||||
function getTenantName(tenantId) {
|
||||
const tenant = tenants.value.find(t => t.tenant_id === tenantId)
|
||||
return tenant ? tenant.tenant_name : tenantId
|
||||
const tenant = tenants.value.find(t => t.code === tenantId)
|
||||
return tenant ? tenant.name : tenantId
|
||||
}
|
||||
|
||||
function getChannelTypeName(type) {
|
||||
@@ -190,7 +190,7 @@ onMounted(() => {
|
||||
<!-- 筛选 -->
|
||||
<div class="filter-bar">
|
||||
<el-select v-model="query.tenant_id" placeholder="全部租户" clearable style="width: 180px">
|
||||
<el-option v-for="t in tenants" :key="t.tenant_id" :label="t.tenant_name" :value="t.tenant_id" />
|
||||
<el-option v-for="t in tenants" :key="t.code" :label="t.name" :value="t.code" />
|
||||
</el-select>
|
||||
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
||||
</div>
|
||||
@@ -236,7 +236,7 @@ onMounted(() => {
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="所属租户" prop="tenant_id">
|
||||
<el-select v-model="form.tenant_id" placeholder="选择租户" style="width: 100%">
|
||||
<el-option v-for="t in tenants" :key="t.tenant_id" :label="t.tenant_name" :value="t.tenant_id" />
|
||||
<el-option v-for="t in tenants" :key="t.code" :label="t.name" :value="t.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道名称" prop="channel_name">
|
||||
|
||||
Reference in New Issue
Block a user