Skip to content

Commit 3407cc6

Browse files
committed
🐛 修复 sms 在 IDEA 报错的问题
1 parent dd4a77f commit 3407cc6

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

src/api/system/sms/smsChannel/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const getSmsChannelPage = (params: PageParam) => {
1919

2020
// 获得短信渠道精简列表
2121
export function getSimpleSmsChannelList() {
22-
return request.get({ url: '/system/sms-channel/list-all-simple' })
22+
return request.get({ url: '/system/sms-channel/simple-list' })
2323
}
2424

2525
// 查询短信渠道详情

src/api/system/sms/smsTemplate/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import request from '@/config/axios'
22

33
export interface SmsTemplateVO {
4-
id: number | null
5-
type: number | null
4+
id?: number
5+
type?: number
66
status: number
77
code: string
88
name: string
99
content: string
1010
remark: string
1111
apiTemplateId: string
12-
channelId: number | null
12+
channelId?: number
1313
channelCode?: string
1414
params?: string[]
1515
createTime?: Date

src/views/system/sms/channel/SmsChannelForm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<el-select v-model="formData.code" clearable placeholder="请选择渠道编码">
1515
<el-option
1616
v-for="dict in getStrDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE)"
17-
:key="dict.value"
17+
:key="dict.value as number"
1818
:label="dict.label"
1919
:value="dict.value"
2020
/>
@@ -24,7 +24,7 @@
2424
<el-radio-group v-model="formData.status">
2525
<el-radio
2626
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
27-
:key="dict.value"
27+
:key="dict.value as number"
2828
:label="dict.value"
2929
>
3030
{{ dict.label }}

src/views/system/sms/channel/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<el-select v-model="queryParams.status" placeholder="请选择启用状态" clearable>
2222
<el-option
2323
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
24-
:key="dict.value"
24+
:key="dict.value as number"
2525
:label="dict.label"
2626
:value="dict.value"
2727
/>

src/views/system/sms/template/SmsTemplateForm.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<el-select v-model="formData.type" placeholder="请选择短信类型">
2525
<el-option
2626
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE)"
27-
:key="dict.value"
27+
:key="dict.value as number"
2828
:label="dict.label"
2929
:value="dict.value"
3030
/>
@@ -43,7 +43,7 @@
4343
<el-radio-group v-model="formData.status">
4444
<el-radio
4545
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
46-
:key="dict.value"
46+
:key="dict.value as number"
4747
:label="parseInt(dict.value as string)"
4848
>
4949
{{ dict.label }}
@@ -79,15 +79,15 @@ const dialogTitle = ref('') // 弹窗的标题
7979
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
8080
const formType = ref('') // 表单的类型
8181
const formData = ref<SmsTemplateApi.SmsTemplateVO>({
82-
id: null,
83-
type: null,
82+
id: undefined,
83+
type: undefined,
8484
status: CommonStatusEnum.ENABLE,
8585
code: '',
8686
name: '',
8787
content: '',
8888
remark: '',
8989
apiTemplateId: '',
90-
channelId: null
90+
channelId: undefined
9191
})
9292
const formRules = reactive({
9393
type: [{ required: true, message: '短信类型不能为空', trigger: 'change' }],
@@ -148,15 +148,15 @@ const submitForm = async () => {
148148
/** 重置表单 */
149149
const resetForm = () => {
150150
formData.value = {
151-
id: null,
152-
type: null,
151+
id: undefined,
152+
type: undefined,
153153
status: CommonStatusEnum.ENABLE,
154154
code: '',
155155
name: '',
156156
content: '',
157157
remark: '',
158158
apiTemplateId: '',
159-
channelId: null
159+
channelId: undefined
160160
}
161161
formRef.value?.resetFields()
162162
}

src/views/system/sms/template/index.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
>
2020
<el-option
2121
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE)"
22-
:key="dict.value"
22+
:key="dict.value as number"
2323
:label="dict.label"
2424
:value="dict.value"
2525
/>
@@ -34,7 +34,7 @@
3434
>
3535
<el-option
3636
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
37-
:key="dict.value"
37+
:key="dict.value as number"
3838
:label="dict.label"
3939
:value="dict.value"
4040
/>
@@ -232,12 +232,12 @@ const queryFormRef = ref() // 搜索的表单
232232
const queryParams = reactive({
233233
pageNo: 1,
234234
pageSize: 10,
235-
type: null,
236-
status: null,
235+
type: undefined,
236+
status: undefined,
237237
code: '',
238238
content: '',
239239
apiTemplateId: '',
240-
channelId: null,
240+
channelId: undefined,
241241
createTime: []
242242
})
243243
const exportLoading = ref(false) // 导出的加载中

0 commit comments

Comments
 (0)