Commit bf2b4ced by puhui999

update: 修复检索表单短信下拉菜单undefined问题

parent 16c4bb5d
...@@ -51,10 +51,7 @@ ...@@ -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 @@ ...@@ -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(() => { ...@@ -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) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment