forked from github/dataease
style: 文案提示修改
This commit is contained in:
parent
d0c5536cfb
commit
6e25bafd37
@ -631,7 +631,7 @@ export default {
|
|||||||
belong_group: '所属分组',
|
belong_group: '所属分组',
|
||||||
select_group: '选择分组',
|
select_group: '选择分组',
|
||||||
name_can_not_empty: '名称不能为空',
|
name_can_not_empty: '名称不能为空',
|
||||||
template_can_not_empty: '请选择仪表版',
|
template_can_not_empty: '请导入模版',
|
||||||
custom_count: '记录数',
|
custom_count: '记录数',
|
||||||
table_title_fontsize: '表头字体大小',
|
table_title_fontsize: '表头字体大小',
|
||||||
table_item_fontsize: '表格字体大小',
|
table_item_fontsize: '表格字体大小',
|
||||||
|
@ -8,7 +8,12 @@
|
|||||||
label-position="top"
|
label-position="top"
|
||||||
>
|
>
|
||||||
<el-form-item :label="'选择分类'" prop="categories" style="margin-top: 16px">
|
<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
|
<el-option
|
||||||
v-for="option in templateCategories"
|
v-for="option in templateCategories"
|
||||||
:key="option.id"
|
:key="option.id"
|
||||||
@ -30,6 +35,7 @@
|
|||||||
import { onMounted, reactive, ref } from 'vue'
|
import { onMounted, reactive, ref } from 'vue'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { batchUpdate } from '@/api/template'
|
import { batchUpdate } from '@/api/template'
|
||||||
|
import { ElMessage } from 'element-plus-secondary'
|
||||||
const emits = defineEmits(['closeBatchEditTemplateDialog', 'refresh'])
|
const emits = defineEmits(['closeBatchEditTemplateDialog', 'refresh'])
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -52,7 +58,7 @@ const state = reactive({
|
|||||||
categories: [
|
categories: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('commons.input_content'),
|
message: '请选择分类',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -72,7 +78,16 @@ const saveChange = () => {
|
|||||||
templateIds: props.templateIds,
|
templateIds: props.templateIds,
|
||||||
categories: state.templateInfo.categories
|
categories: state.templateInfo.categories
|
||||||
}
|
}
|
||||||
|
if (!state.templateInfo.categories.length) {
|
||||||
|
ElMessage.warning('请选择分类')
|
||||||
|
return false
|
||||||
|
}
|
||||||
batchUpdate(params).then(rsp => {
|
batchUpdate(params).then(rsp => {
|
||||||
|
ElMessage({
|
||||||
|
message: '修改成功',
|
||||||
|
type: 'success',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
emits('refresh')
|
emits('refresh')
|
||||||
emits('closeBatchEditTemplateDialog')
|
emits('closeBatchEditTemplateDialog')
|
||||||
})
|
})
|
||||||
|
@ -283,6 +283,11 @@ const batchPreDelete = () => {
|
|||||||
categories: [state.currentTemplateId]
|
categories: [state.currentTemplateId]
|
||||||
}
|
}
|
||||||
batchDelete(params).then(rsp => {
|
batchDelete(params).then(rsp => {
|
||||||
|
ElMessage({
|
||||||
|
message: t('commons.delete_success'),
|
||||||
|
type: 'success',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel)
|
showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user