服务指令:新增预览图片、即时指令图片

This commit is contained in:
1378012178@qq.com 2025-04-01 09:50:04 +08:00
parent a2c54d328e
commit b784891110
2 changed files with 34 additions and 7 deletions

View File

@ -45,13 +45,13 @@ export const columns: BasicColumn[] = [
title: '指令标签', title: '指令标签',
align: 'center', align: 'center',
dataIndex: 'tagList', dataIndex: 'tagList',
width:150, width: 150,
ellipsis: false, ellipsis: false,
format(text, record, index) { format(text, record, index) {
if(!!text && text.length>0){ if (!!text && text.length > 0) {
return text.map(item => item.tagName).join('、'); return text.map((item) => item.tagName).join('、');
}else{ } else {
return '-' return '-';
} }
}, },
}, },
@ -113,12 +113,12 @@ export const columns: BasicColumn[] = [
}, },
{ {
title: '语音文件', title: '语音文件',
align: "center", align: 'center',
dataIndex: 'mp3File', dataIndex: 'mp3File',
}, },
{ {
title: '视频文件', title: '视频文件',
align: "center", align: 'center',
dataIndex: 'mp4File', dataIndex: 'mp4File',
}, },
// { // {
@ -143,6 +143,18 @@ export const columns: BasicColumn[] = [
// sorter: true, // sorter: true,
// dataIndex: 'updateTime' // dataIndex: 'updateTime'
// }, // },
{
title: '预览图片',
align: 'center',
dataIndex: 'previewFile',
customRender: render.renderImage,
},
{
title: '即时指令图片',
align: 'center',
dataIndex: 'immediateFile',
customRender: render.renderImage,
},
]; ];
// 高级查询数据 // 高级查询数据

View File

@ -136,6 +136,18 @@
</a-form-item> </a-form-item>
</a-col> --> </a-col> -->
</a-row> </a-row>
<a-row>
<a-col :span="12">
<a-form-item label="预览图片" v-bind="validateInfos.previewFile">
<JImageUpload :fileMax="1" v-model:value="formData.previewFile"></JImageUpload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="即时指令图片" v-bind="validateInfos.immediateFile">
<JImageUpload :fileMax="1" v-model:value="formData.immediateFile"></JImageUpload>
</a-form-item>
</a-col>
</a-row>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="语音文件" v-bind="validateInfos.mp3File" id="ConfigServiceDirectiveForm-mp3File" <a-form-item label="语音文件" v-bind="validateInfos.mp3File" id="ConfigServiceDirectiveForm-mp3File"
@ -186,6 +198,7 @@ import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { JCheckbox } from '/@/components/Form'; import { JCheckbox } from '/@/components/Form';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue'; import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import { getValueType } from '/@/utils'; import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../ConfigServiceDirective.api'; import { saveOrUpdate } from '../ConfigServiceDirective.api';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
@ -221,6 +234,8 @@ const formData = reactive<Record<string, any>>({
updateTime: '', updateTime: '',
mp3File: '', mp3File: '',
mp4File: '', mp4File: '',
previewFile: '',
immediateFile: '',
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });