style: 文案提示修改

This commit is contained in:
wangjiahao 2023-12-27 12:15:19 +08:00
parent d0c5536cfb
commit 6e25bafd37
3 changed files with 23 additions and 3 deletions

View File

@ -631,7 +631,7 @@ export default {
belong_group: '所属分组',
select_group: '选择分组',
name_can_not_empty: '名称不能为空',
template_can_not_empty: '请选择仪表版',
template_can_not_empty: '请导入模版',
custom_count: '记录数',
table_title_fontsize: '表头字体大小',
table_item_fontsize: '表格字体大小',

View File

@ -8,7 +8,12 @@
label-position="top"
>
<el-form-item :label="'选择分类'" prop="categories" style="margin-top: 16px">
<el-select v-model="state.templateInfo.categories" multiple style="width: 100%">
<el-select
v-model="state.templateInfo.categories"
placeholder="可多选"
multiple
style="width: 100%"
>
<el-option
v-for="option in templateCategories"
:key="option.id"
@ -30,6 +35,7 @@
import { onMounted, reactive, ref } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { batchUpdate } from '@/api/template'
import { ElMessage } from 'element-plus-secondary'
const emits = defineEmits(['closeBatchEditTemplateDialog', 'refresh'])
const { t } = useI18n()
const props = defineProps({
@ -52,7 +58,7 @@ const state = reactive({
categories: [
{
required: true,
message: t('commons.input_content'),
message: '请选择分类',
trigger: 'change'
}
]
@ -72,7 +78,16 @@ const saveChange = () => {
templateIds: props.templateIds,
categories: state.templateInfo.categories
}
if (!state.templateInfo.categories.length) {
ElMessage.warning('请选择分类')
return false
}
batchUpdate(params).then(rsp => {
ElMessage({
message: '修改成功',
type: 'success',
showClose: true
})
emits('refresh')
emits('closeBatchEditTemplateDialog')
})

View File

@ -283,6 +283,11 @@ const batchPreDelete = () => {
categories: [state.currentTemplateId]
}
batchDelete(params).then(rsp => {
ElMessage({
message: t('commons.delete_success'),
type: 'success',
showClose: true
})
showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel)
})
})