update: 修复检索表单短信下拉菜单undefined问题
This commit is contained in:
parent
16c4bb5dca
commit
bf2b4ced8c
@ -51,10 +51,7 @@
|
|||||||
:key="channel.id"
|
:key="channel.id"
|
||||||
:value="channel.id"
|
:value="channel.id"
|
||||||
:label="
|
:label="
|
||||||
channel.signature +
|
channel.signature + optionLabel(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, channel.code)
|
||||||
'【' +
|
|
||||||
getDictObj(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, channel.code) +
|
|
||||||
'】'
|
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -205,7 +202,7 @@
|
|||||||
<SmsTemplateFrom ref="modalRef" :channelOptions="channelOptions" @success="getList" />
|
<SmsTemplateFrom ref="modalRef" :channelOptions="channelOptions" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="SmsTemplate">
|
<script setup lang="ts" name="SmsTemplate">
|
||||||
import { DICT_TYPE, getDictOptions, getDictObj } from '@/utils/dict'
|
import { DICT_TYPE, getDictOptions, getDictLabel } from '@/utils/dict'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import * as templateApi from '@/api/system/sms/smsTemplate'
|
import * as templateApi from '@/api/system/sms/smsTemplate'
|
||||||
import * as SmsChannelApi from '@/api/system/sms/smsChannel'
|
import * as SmsChannelApi from '@/api/system/sms/smsChannel'
|
||||||
@ -282,6 +279,9 @@ onMounted(() => {
|
|||||||
channelOptions.value = res
|
channelOptions.value = res
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
const optionLabel = computed(
|
||||||
|
() => (type: string, code: string) => `【${getDictLabel(type, code)}】`
|
||||||
|
)
|
||||||
/** 格式化短信渠道 */
|
/** 格式化短信渠道 */
|
||||||
const formatChannelSignature = (channelId: number) => {
|
const formatChannelSignature = (channelId: number) => {
|
||||||
channelOptions.value.forEach((item) => {
|
channelOptions.value.forEach((item) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user