mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-17 04:15:07 +08:00
Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into dev
Conflicts: build/vite/optimize.ts
This commit is contained in:
@ -122,7 +122,9 @@ const open = async (type: string, id?: number, dictType?: string) => {
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
formData.value.dictType = dictType
|
||||
if (dictType) {
|
||||
formData.value.dictType = dictType
|
||||
}
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
|
@ -17,9 +17,9 @@
|
||||
<el-select v-model="formData.type" clearable placeholder="请选择公告类型">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_NOTICE_TYPE)"
|
||||
:key="parseInt(dict.value)"
|
||||
:key="parseInt(dict.value as any)"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
:value="parseInt(dict.value as any)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -27,9 +27,9 @@
|
||||
<el-select v-model="formData.status" clearable placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||
:key="parseInt(dict.value)"
|
||||
:key="parseInt(dict.value as any)"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
:value="parseInt(dict.value as any)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -44,7 +44,6 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" name="SystemNotifyTemplateSendForm" setup>
|
||||
import * as SmsTemplateApi from '@/api/system/sms/smsTemplate'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import * as NotifyTemplateApi from '@/api/system/notify/template'
|
||||
const message = useMessage() // 消息弹窗
|
||||
@ -102,8 +101,8 @@ const submitForm = async () => {
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as SmsTemplateApi.SendSmsReqVO
|
||||
const logId = await SmsTemplateApi.sendSms(data)
|
||||
const data = formData.value as unknown as NotifyTemplateApi.NotifySendReqVO
|
||||
const logId = await NotifyTemplateApi.sendNotify(data)
|
||||
if (logId) {
|
||||
message.success('提交发送成功!发送结果,见发送日志编号:' + logId)
|
||||
}
|
||||
@ -121,7 +120,7 @@ const resetForm = () => {
|
||||
mobile: '',
|
||||
templateCode: '',
|
||||
templateParams: new Map()
|
||||
}
|
||||
} as any
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
|
@ -80,7 +80,7 @@
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleForceLogout(scope.row.id)"
|
||||
@click="handleForceLogout(scope.row.accessToken)"
|
||||
v-hasPermi="['system:oauth2-token:delete']"
|
||||
>
|
||||
强退
|
||||
@ -142,12 +142,12 @@ const resetQuery = () => {
|
||||
}
|
||||
|
||||
/** 强制退出操作 */
|
||||
const handleForceLogout = async (id: number) => {
|
||||
const handleForceLogout = async (accessToken: string) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.confirm('是否要强制退出用户')
|
||||
// 发起删除
|
||||
await OAuth2AccessTokenApi.deleteAccessToken(id)
|
||||
await OAuth2AccessTokenApi.deleteAccessToken(accessToken)
|
||||
message.success(t('common.success'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
|
@ -117,7 +117,7 @@ const resetForm = () => {
|
||||
sort: undefined,
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
remark: ''
|
||||
}
|
||||
} as any
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user