File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/views/system/sms/smsTemplate Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 51
51
:key =" channel.id"
52
52
:value =" channel.id"
53
53
:label ="
54
- channel.signature +
55
- '【' +
56
- getDictObj(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, channel.code) +
57
- '】'
54
+ channel.signature + optionLabel(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, channel.code)
58
55
"
59
56
/>
60
57
</el-select >
205
202
<SmsTemplateFrom ref =" modalRef" :channelOptions =" channelOptions" @success =" getList" />
206
203
</template >
207
204
<script setup lang="ts" name="SmsTemplate">
208
- import { DICT_TYPE , getDictOptions , getDictObj } from ' @/utils/dict'
205
+ import { DICT_TYPE , getDictOptions , getDictLabel } from ' @/utils/dict'
209
206
import { dateFormatter } from ' @/utils/formatTime'
210
207
import * as templateApi from ' @/api/system/sms/smsTemplate'
211
208
import * as SmsChannelApi from ' @/api/system/sms/smsChannel'
@@ -282,6 +279,9 @@ onMounted(() => {
282
279
channelOptions .value = res
283
280
})
284
281
})
282
+ const optionLabel = computed (
283
+ () => (type : string , code : string ) => ` 【${getDictLabel (type , code )}】 `
284
+ )
285
285
/** 格式化短信渠道 */
286
286
const formatChannelSignature = (channelId : number ) => {
287
287
channelOptions .value .forEach ((item ) => {
You can’t perform that action at this time.
0 commit comments